Control method and system of electric beam limiter, readable storage medium and electric beam limiter

文档序号:1849363 发布日期:2021-11-16 浏览:16次 中文

阅读说明:本技术 电动限束器的控制方法、系统、可读存储介质及电动限束器 (Control method and system of electric beam limiter, readable storage medium and electric beam limiter ) 是由 王杰杰 陆佳斌 于 2021-08-12 设计创作,主要内容包括:本发明提供一种电动限束器的控制方法、系统、可读存储介质及电动限束器,所述控制方法包括:计算步进电机从运行起点位置运动到预设目标位置的设定运行步数;待步进电机运行停止后,计算步进电机从运行起点位置运动到预设目标位置的实际运行步数;判断步进电机是否丢步;若是,获取步进电机的当前位置,将步进电机的当前位置设定为新的运行起始位置,并计算新的运行起始位置到预设目标位置的补偿步数,根据补偿步数,控制所述步进电机运行;若否,则结束进程。本发明为电动限束器的步进电机加装编码器,实现了对步进电机的闭环控制,通过实时反馈运行中步进电机的丢步情况,并且对步进电机丢步进行补偿,从而实现射线窗口精准控制的效果。(The invention provides a control method and a system of an electric beam limiter, a readable storage medium and the electric beam limiter, wherein the control method comprises the following steps: calculating the set operation steps of the stepping motor moving from the operation starting position to the preset target position; after the operation of the stepping motor is stopped, calculating the actual operation steps of the stepping motor moving from the operation starting position to the preset target position; judging whether the stepping motor loses steps; if yes, acquiring the current position of the stepping motor, setting the current position of the stepping motor as a new operation starting position, calculating the compensation step number from the new operation starting position to a preset target position, and controlling the stepping motor to operate according to the compensation step number; if not, the process is ended. The invention adds the encoder to the stepping motor of the electric beam limiter, realizes the closed-loop control of the stepping motor, and realizes the effect of precise control of the ray window by feeding back the step loss condition of the stepping motor in real time and compensating the step loss of the stepping motor.)

1. A control method of an electric beam limiter is characterized in that the electric beam limiter comprises a stepping motor and an encoder connected with the stepping motor; the control method of the electric beam limiter comprises the following steps:

calculating a set operation step number of the stepping motor moving from the operation starting point position to a preset target position according to the operation starting point position and the preset target position of the stepping motor;

after the operation of the stepping motor is stopped, calculating the actual operation step number of the stepping motor moving from the operation starting position to the preset target position; the actual operation steps are converted according to the pulse signals output by the encoder;

judging whether the stepping motor loses steps or not; if yes, acquiring the current position of the stepping motor, setting the current position of the stepping motor as a new operation starting position, calculating the compensation step number from the new operation starting position to a preset target position, and controlling the stepping motor to operate according to the compensation step number; if not, the process is ended.

2. The method for controlling an electric beam limiter according to claim 1, wherein before the step of calculating the actual number of operation steps of the stepping motor moving from the operation start position to the preset target position, the method for controlling an electric beam limiter further comprises: monitoring the running state of the stepping motor to judge whether the stepping motor stops running or not; if yes, the step of calculating the actual operation step number of the stepping motor moving from the operation starting position to the preset target position is carried out; if not, the running state of the stepping motor is continuously monitored.

3. The method for controlling an electric beam limiter according to claim 1, wherein the step of calculating the set number of operation steps of the stepping motor moving from the operation start position to the preset target position based on the operation start position and the preset target position of the stepping motor comprises:

respectively mapping and searching a first operation step number of the stepping motor from a zero position to an operation starting position and a second operation step number of the stepping motor from the zero position to a preset target position according to the operation starting position and the preset target position of the stepping motor;

calculating the set operation steps of the stepping motor moving from the operation starting position to the preset target position; the set operation step number is equal to the second operation step number minus the first operation step number.

4. The method of controlling an electric beam limiter according to claim 3,

the running steps of the stepping motor are obtained by searching through a preset mapping relation;

the preset mapping relation is as follows:

wherein Steps represents the running Steps of the stepping motor running to the execution position; pos represents the designated position of the stepper motor movement; h represents the distance from the focal point of the ray source to the lead leaf; SID represents the distance from the focal point of the ray source to the imaging plane; MotorCircleSteps represents the number of steps of one rotation of the motor; SlotPos represents the distance that the lead blades are moved by one revolution of the motor.

5. The method for controlling an electric beam limiter according to claim 4, wherein the step of calculating the number of compensation steps for the current position of the stepping motor to the preset target position comprises:

calculating a third operation step number of the stepping motor to the current position according to the preset mapping relation;

calculating the compensation step number from the current position of the stepping motor to a preset target position; the compensation step number is equal to the second operation step number minus the third operation step number.

6. The method for controlling an electric beam limiter according to claim 1, wherein the step of calculating the actual number of operation steps of the stepping motor moving from the operation start position to the preset target position comprises:

capturing the number of pulse signals output by the encoder;

calculating the actual running step number of the stepping motor moving from the running starting point position to the preset target position according to the conversion relation between the number of the pulse signals and the pre-stored step number of the motor;

the conversion relation of the pre-stored motor step numbers is equal to the ratio of the number of the captured pulse signals to the resolution of the encoder, and then the product of the running step number of one turn of the stepping motor and the subdivision value of the stepping motor is multiplied; the detail value of the stepping motor provides attribute parameters for the stepping motor; the resolution of the encoder is an attribute parameter provided by the encoder.

7. The method for controlling an electric beam limiter according to claim 1, wherein the step loss of the stepping motor is determined by determining whether the actual number of operation steps is equal to a set number of operation steps, and if so, determining that the stepping motor has no step loss; and if not, judging that the stepping motor is in step loss.

8. A control system of an electric beam limiter is characterized in that the electric beam limiter comprises a stepping motor and an encoder connected with the stepping motor; the control system of the electric beam limiter comprises:

the first calculation module is used for calculating the set operation step number of the stepping motor moving from the operation starting point position to the preset target position according to the operation starting point position and the preset target position of the stepping motor;

the second calculation module is used for calculating the actual operation step number of the stepping motor moving from the operation starting position to the preset target position after the stepping motor stops operating; the actual operation steps are converted according to the pulse signals output by the encoder;

the processing module is used for judging whether the stepping motor loses steps; if yes, acquiring the current position of the stepping motor, setting the current position of the stepping motor as a new operation starting position, calling the first calculation module to calculate the compensation step number from the new operation starting position to a preset target position, and controlling the stepping motor to operate according to the compensation step number; if not, the control system stops running.

9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of controlling an electric beam limiter according to any one of claims 1 to 7.

10. An electric beam limiter is characterized by comprising a stepping motor, an encoder connected with the stepping motor and chips respectively connected with the stepping motor and the encoder; the chip includes: a processor and a memory;

the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory to enable the chip to execute the control method of the electric beam limiter according to any one of claims 1 to 7.

Technical Field

The invention belongs to the technical field of X-ray medical diagnosis, relates to a control method and a control system, and particularly relates to a control method and a control system of an electric beam limiter, a readable storage medium and the electric beam limiter.

Background

The electric beam limiter is mainly used for fluoroscopy, is convenient for remote control, and is an essential component for remotely controlling the gastrointestinal bed. The opening and closing of the lead blades of the electric beam limiter are generally driven by a miniature direct current motor, and the irradiation field can be adjusted to the required size by properly controlling the forward rotation, the reverse rotation and the running time of the direct current motor. The special electric beam limiter for fluoroscopy needs to adjust the size of the irradiation field at any time in the fluoroscopy equipment with the impact intensifier, so that the irradiation field indication and the light display are not needed. Because the input screen of the impact enhancer is circular, the lead leaf structure of the shading wire generally adopts a leaf lobe type, and the diameter of the irradiation field can be continuously changed under the operation of a motor.

At present, most of electric beam limiters adopting a stepping motor as motion control are controlled in an open loop mode, the precision of the stepping motor in the operation process can be influenced by a plurality of factors such as machinery, motion curves of the stepping motor and torque, the stepping motor loses steps, and a ray window cannot reach a specified size, so that the use is influenced.

Therefore, how to provide a control method and system for an electric beam limiter, a readable storage medium and an electric beam limiter, so as to solve the defects that the existing electric beam limiter uses open loop control, which affects the precision of a motor in the operation process, causes step loss of a stepping motor, causes a radiation window not to reach a specified size, affects use, and the like, and thus, the technical problem to be solved by the technical personnel in the field is really urgent.

Disclosure of Invention

In view of the above drawbacks of the prior art, an object of the present invention is to provide a method and a system for controlling an electric beam limiter, a readable storage medium, and an electric beam limiter, which are used to solve the problem that the accuracy of a motor in an operation process is affected by using open-loop control in the conventional electric beam limiter, so that a step motor loses steps, a radiation window cannot reach a specified size, and use is affected.

In order to achieve the above objects and other related objects, the present invention provides a method for controlling an electric beam limiter, the electric beam limiter including a stepping motor and an encoder connected to the stepping motor; the control method of the electric beam limiter comprises the following steps: calculating a set operation step number of the stepping motor moving from the operation starting point position to a preset target position according to the operation starting point position and the preset target position of the stepping motor; after the operation of the stepping motor is stopped, calculating the actual operation step number of the stepping motor moving from the operation starting position to the preset target position; the actual operation steps are converted according to the pulse signals output by the encoder; judging whether the stepping motor loses steps or not; if yes, acquiring the current position of the stepping motor, setting the current position of the stepping motor as a new operation starting position, calculating the compensation step number from the new operation starting position to a preset target position, and controlling the stepping motor to operate according to the compensation step number; if not, the process is ended.

In an embodiment of the present invention, before the step of calculating the actual number of operation steps of the stepping motor moving from the operation start position to the preset target position, the method for controlling the electric beam limiter further includes: monitoring the running state of the stepping motor to judge whether the stepping motor stops running or not; if yes, the step of calculating the actual operation step number of the stepping motor moving from the operation starting position to the preset target position is carried out; if not, the running state of the stepping motor is continuously monitored.

In an embodiment of the present invention, the step of calculating the set operation step number of the stepping motor moving from the operation starting position to the preset target position according to the operation starting position and the preset target position of the stepping motor includes: respectively mapping and searching a first operation step number of the stepping motor from a zero position to an operation starting position and a second operation step number of the stepping motor from the zero position to a preset target position according to the operation starting position and the preset target position of the stepping motor; calculating the set operation steps of the stepping motor moving from the operation starting position to the preset target position; the set operation step number is equal to the second operation step number minus the first operation step number.

In an embodiment of the present invention, the number of operation steps of the stepping motor is obtained by searching through a preset mapping relationship;the preset mapping relation is as follows:wherein Steps represents the running Steps of the stepping motor running to the execution position; pos represents the designated position of the stepper motor movement; h represents the distance from the focal point of the ray source to the lead leaf; SID represents the distance from the focal point of the ray source to the imaging plane; MotorCircleSteps represents the number of steps of one rotation of the motor; SlotPos represents the distance that the lead blades are moved by one revolution of the motor.

In an embodiment of the present invention, the step of calculating the number of compensation steps from the current position of the stepping motor to the preset target position includes: calculating a third operation step number of the stepping motor to the current position according to the preset mapping relation; calculating the compensation step number from the current position of the stepping motor to a preset target position; the compensation step number is equal to the second operation step number minus the third operation step number.

In an embodiment of the present invention, the step of calculating the actual number of operation steps of the stepping motor moving from the operation starting position to the preset target position includes: capturing the number of pulse signals output by the encoder; calculating the actual running step number of the stepping motor moving from the running starting point position to the preset target position according to the conversion relation between the number of the pulse signals and the pre-stored step number of the motor; the conversion relation of the pre-stored motor step numbers is equal to the ratio of the number of the captured pulse signals to the resolution of the encoder, and then the product of the running step number of one turn of the stepping motor and the subdivision value of the stepping motor is multiplied; the detail value of the stepping motor provides attribute parameters for the stepping motor; the resolution of the encoder is an attribute parameter provided by the encoder.

In an embodiment of the present invention, the basis for determining whether the step motor loses steps is to determine whether the actual number of operation steps is equal to the set number of operation steps, and if so, determine that the step motor does not lose steps; and if not, judging that the stepping motor is in step loss.

The invention provides a control system of an electric beam limiter, which comprises a stepping motor and an encoder connected with the stepping motor; the control system of the electric beam limiter comprises: the first calculation module is used for calculating the set operation step number of the stepping motor moving from the operation starting point position to the preset target position according to the operation starting point position and the preset target position of the stepping motor; the second calculation module is used for calculating the actual operation step number of the stepping motor moving from the operation starting position to the preset target position after the stepping motor stops operating; the actual operation steps are converted according to the pulse signals output by the encoder; the processing module is used for judging whether the stepping motor loses steps; if yes, acquiring the current position of the stepping motor, setting the current position of the stepping motor as a new operation starting position, calling the first calculation module to calculate the compensation step number from the new operation starting position to a preset target position, and controlling the stepping motor to operate according to the compensation step number; if not, the control system stops running.

Yet another aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of controlling the electric beam limiter.

The last aspect of the invention provides an electric beam limiter, which comprises a stepping motor, an encoder connected with the stepping motor and chips respectively connected with the stepping motor and the encoder; the chip includes: a processor and a memory; the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory so as to enable the chip to execute the control method of the electric beam limiter.

As described above, the control method, system, readable storage medium and electric beam limiter of the electric beam limiter according to the present invention have the following advantages:

the control method and the system of the electric beam limiter, the readable storage medium and the electric beam limiter are characterized in that an encoder is additionally arranged on the stepping motor of the electric beam limiter, so that the closed-loop control of the stepping motor is realized, the step loss condition of the stepping motor in operation is fed back in real time, and the step loss of the stepping motor is compensated, thereby realizing the effect of accurately controlling a ray window. And the step loss situation caused by the unfavorable factors of unsmooth or slight blockage possibly existing in long-term movement of mechanical moving parts, over limit of the running curve of the stepping motor, insufficient torque possibly existing in the stepping motor in high-speed running and the like is improved to a great extent.

Drawings

Fig. 1 is a schematic diagram showing a hardware structure of the electric beam limiter of the present invention.

Fig. 2 is a flowchart illustrating a control method of the electric beam limiter according to an embodiment of the invention.

Fig. 3 is a schematic structural diagram of a control system of an electric beam limiter according to an embodiment of the present invention.

Description of the element reference numerals

Detailed Description

The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.

It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.

Example one

The embodiment provides a control method of an electric beam limiter, wherein the electric beam limiter comprises a stepping motor and an encoder connected with the stepping motor; the control method of the electric beam limiter comprises the following steps:

calculating a set operation step number of the stepping motor moving from the operation starting point position to a preset target position according to the operation starting point position and the preset target position of the stepping motor;

after the operation of the stepping motor is stopped, calculating the actual operation step number of the stepping motor moving from the operation starting position to the preset target position; the actual operation steps are converted according to the pulse signals output by the encoder;

judging whether the stepping motor loses steps or not; if yes, acquiring the current position of the stepping motor, setting the current position of the stepping motor as a new operation starting position, calculating the compensation step number from the new operation starting position to a preset target position, and controlling the stepping motor to operate according to the compensation step number; if not, the process is ended.

The control method of the electric beam limiter provided by the present embodiment will be described in detail with reference to the drawings. The hardware structure of the electric beam limiter of this embodiment is shown in fig. 1, and the electric beam limiter 1 includes a stepping motor 11, an encoder 12 connected to the stepping motor 11, and a chip (not shown) connected to the stepping motor 11 and the encoder 12. The stepping motor 11, the encoder 12 and the chip form a control closed loop for the stepping motor 11.

Please refer to fig. 2, which is a flowchart illustrating a control method of an electric beam limiter in an embodiment. As shown in fig. 2, the control method of the electric beam limiter specifically includes the following steps:

and S21, calculating the set running step number of the stepping motor moving from the running starting point position to the preset target position according to the running starting point position and the preset target position of the stepping motor.

In this embodiment, the S21 includes the following steps:

respectively mapping and searching a first operation step number of the stepping motor from a zero position to an operation starting position and a second operation step number of the stepping motor from the zero position to a preset target position according to the operation starting position and the preset target position of the stepping motor;

calculating the set operation steps of the stepping motor moving from the operation starting position to the preset target position; the set operation step number is equal to the second operation step number minus the first operation step number.

In this embodiment, the number of operation steps of the stepping motor is obtained by searching through a preset mapping relationship;

the preset mapping relation is as follows:

wherein Steps represents the running Steps of the stepping motor running to the execution position; pos represents the designated position of the stepper motor movement; h represents the distance from the focal point of the ray source to the lead leaf; SID represents the distance from the focal point of the ray source to the imaging plane; MotorCircleSteps represents the number of steps of one rotation of the motor; SlotPos represents the distance that the lead blades are moved by one revolution of the motor.

Specifically, the calculation formula of the first operation step number of the stepping motor from the zero point position to the operation starting point position is as follows:

the calculation formula of the second operation step number of the stepping motor from the zero position to the preset target position is as follows:

s22, monitoring the running state of the stepping motor to judge whether the stepping motor stops running or not; if yes, go to S23; if not, returning to the step S22, and continuously monitoring the running state of the stepping motor.

S23, after the operation of the stepping motor is stopped, calculating the actual operation step number of the stepping motor moving from the operation starting position to the preset target position; the actual operation steps are converted according to the pulse signals output by the encoder.

In this embodiment, the S23 includes:

capturing the number of pulse signals output by the encoder;

calculating the actual running step number of the stepping motor moving from the running starting point position to the preset target position according to the conversion relation between the number of the pulse signals and the pre-stored step number of the motor;

the conversion relation of the pre-stored motor step numbers is equal to the ratio of the number of the captured pulse signals to the resolution of the encoder, and then the product of the running step number of one turn of the stepping motor and the subdivision value of the stepping motor is multiplied; the detail value of the stepping motor provides attribute parameters for the stepping motor; the resolution of the encoder is an attribute parameter provided by the encoder.

For example, the number of pulse signals output by the capturing encoder is 100 pulses, the number of operation steps of a stepping motor in one rotation is 200 steps, the subdivision value of the stepping motor is 8 subdivisions (common subdivisions include 0 subdivision, 2 subdivision, 4 subdivision, 8 subdivision, 16 subdivision and 32 subdivision), the resolution of the encoder is 1000 lines (namely, the encoder generates 1000 pulse signals in one rotation of the motor), and finally the actual operation steps of the stepping motor moving from the operation starting position to the preset target position is 160 steps according to the conversion relation.

S24, judging whether the step motor loses steps; if yes, go to S25; if not, the process is ended.

In this embodiment, the basis for determining whether the stepping motor loses steps is to determine whether the actual number of operation steps is equal to the set number of operation steps, and if so, determine that the stepping motor does not lose steps; and if not, judging that the stepping motor is in step loss.

And S25, acquiring the current position of the stepping motor, setting the current position of the stepping motor as a new operation starting position, returning to S21 to recalculate the compensation step number from the new operation starting position to a preset target position, and controlling the operation of the stepping motor according to the compensation step number.

In this embodiment, the S25 includes:

calculating a third operation step number of the stepping motor to the current position according to the preset mapping relation;

calculating the compensation step number from the current position of the stepping motor to a preset target position; the compensation step number is equal to the second operation step number minus the third operation step number.

The control method of the electric beam limiter in this embodiment realizes the closed-loop control of the stepping motor by feeding back the step loss condition of the stepping motor in operation in real time and compensating the step loss of the stepping motor, thereby realizing the effect of precise control of the ray window. And the step loss situation caused by the unfavorable factors of unsmooth or slight blockage possibly existing in long-term movement of mechanical moving parts, over limit of the running curve of the stepping motor, insufficient torque possibly existing in the stepping motor in high-speed running and the like is improved to a great extent.

The present embodiment also provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the control method as described in fig. 2.

The present application may be embodied as systems, methods, and/or computer program products, in any combination of technical details. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present application.

The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.

The computer-readable programs described herein may be downloaded from a computer-readable storage medium to a variety of computing/processing devices, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device. The computer program instructions for carrying out operations of the present application may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry can execute computer-readable program instructions to implement aspects of the present application by utilizing state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).

Example two

The present embodiment provides a control system of an electric beam limiter, where the electric beam limiter includes a stepping motor and an encoder connected to the stepping motor; the control system of the electric beam limiter comprises:

the first calculation module is used for calculating the set operation step number of the stepping motor moving from the operation starting point position to the preset target position according to the operation starting point position and the preset target position of the stepping motor;

the second calculation module is used for calculating the actual operation step number of the stepping motor moving from the operation starting position to the preset target position after the stepping motor stops operating; the actual operation steps are converted according to the pulse signals output by the encoder;

the processing module is used for judging whether the stepping motor loses steps; if yes, acquiring the current position of the stepping motor, setting the current position of the stepping motor as a new operation starting position, calling the first calculation module to calculate the compensation step number from the new operation starting position to a preset target position, and controlling the stepping motor to operate according to the compensation step number; if not, the control system stops running.

The control system of the electric beam limiter provided in the present embodiment will be described in detail with reference to the drawings. Please refer to fig. 3, which is a schematic structural diagram of a control system of an electric beam limiter in an embodiment. As shown in fig. 3, the control system 3 of the electric beam limiter includes a first calculating module 31, a status monitoring module 30, a second calculating module 32 and a processing module 33.

The first calculating module 31 is configured to calculate a set operation step number of the stepping motor moving from the operation starting point position to the preset target position according to the operation starting point position and the preset target position of the stepping motor.

Specifically, the first calculating module 31 respectively maps and searches a first operation step number of the stepping motor from the zero point position to the operation starting point position and a second operation step number of the stepping motor from the zero point position to the preset target position according to the operation starting point position and the preset target position of the stepping motor; calculating the set operation steps of the stepping motor moving from the operation starting position to the preset target position; the set operation step number is equal to the second operation step number minus the first operation step number.

The state monitoring module 30 is configured to monitor an operation state of the stepping motor to determine whether the stepping motor stops operating; if yes, the second calculation module 32 is called; if not, the running state of the stepping motor is continuously monitored.

The second calculating module 32 is configured to calculate an actual operation step number of the stepping motor moving from an operation starting position to a preset target position after the stepping motor stops operating; the actual operation steps are converted according to the pulse signals output by the encoder.

In this embodiment, the second calculating module 32 captures the number of pulse signals output by the encoder; calculating the actual running step number of the stepping motor moving from the running starting point position to the preset target position according to the conversion relation between the number of the pulse signals and the pre-stored step number of the motor; the conversion relation of the pre-stored motor step numbers is equal to the ratio of the number of the captured pulse signals to the resolution of the encoder, and then the product of the running step number of one turn of the stepping motor and the subdivision value of the stepping motor is multiplied; the detail value of the stepping motor provides attribute parameters for the stepping motor; the resolution of the encoder is an attribute parameter provided by the encoder.

The processing module 33 is used for judging whether the stepping motor loses steps; if yes, acquiring the current position of the stepping motor, setting the current position of the stepping motor as a new operation starting position, calling the first calculation module 31 to calculate the compensation step number from the new operation starting position to a preset target position, and controlling the stepping motor to operate according to the compensation step number; if not, the control system stops running.

In this embodiment, the basis for determining whether the stepping motor loses steps is to determine whether the actual number of operation steps is equal to the set number of operation steps, and if so, determine that the stepping motor does not lose steps; and if not, judging that the stepping motor is in step loss.

In this embodiment, the first calculating module 31 calculates a third operation step number of the stepping motor operating to the current position according to the preset mapping relationship; calculating the compensation step number from the current position of the stepping motor to a preset target position; the compensation step number is equal to the second operation step number minus the third operation step number.

It should be noted that the division of the modules of the above system is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And the modules can be realized in a form that all software is called by the processing element, or in a form that all the modules are realized in a form that all the modules are called by the processing element, or in a form that part of the modules are called by the hardware. For example: the x module can be a separately established processing element, and can also be integrated in a certain chip of the system. In addition, the x-module may be stored in the memory of the system in the form of program codes, and may be called by one of the processing elements of the system to execute the functions of the x-module. Other modules are implemented similarly. All or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software. These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), and the like. When a module is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. These modules may be integrated together and implemented in the form of a System-on-a-chip (SOC).

EXAMPLE III

The embodiment provides an electric beam limiter, which comprises a stepping motor, an encoder connected with the stepping motor and chips respectively connected with the stepping motor and the encoder; the chip comprises: a processor, memory, transceiver, communication interface, or/and system bus; the memory is used for storing the computer program, the communication interface is used for communicating with other devices, and the processor and the transceiver are used for operating the computer program to enable the chip to execute the steps of the control method of the electric beam limiter according to the first embodiment.

The above-mentioned system bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The Memory may include a Random Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.

The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components.

The protection scope of the control method of the electric beam limiter according to the present invention is not limited to the execution sequence of the steps listed in the embodiment, and all the solutions of the prior art implemented by the steps addition, subtraction and step replacement according to the principle of the present invention are included in the protection scope of the present invention.

The invention also provides a control system of the electric beam limiter, which can realize the control method of the electric beam limiter, but the realization device of the control method of the electric beam limiter of the invention comprises but is not limited to the structure of the control system of the electric beam limiter enumerated in the embodiment, and all structural modifications and substitutions of the prior art made according to the principle of the invention are included in the protection scope of the invention.

In summary, the control method, the control system, the readable storage medium and the electronic beam limiter of the present invention provide an encoder for the stepping motor of the electronic beam limiter, thereby realizing the closed-loop control of the stepping motor, feeding back the step loss condition of the stepping motor in real time, and compensating the step loss of the stepping motor, thereby realizing the effect of precise control of the radiation window. And the step loss situation caused by the unfavorable factors of unsmooth or slight blockage possibly existing in long-term movement of mechanical moving parts, over limit of the running curve of the stepping motor, insufficient torque possibly existing in the stepping motor in high-speed running and the like is improved to a great extent. The invention effectively overcomes various defects in the prior art and has high industrial utilization value.

The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:电机控制系统及传送线

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!