[go: up one dir, main page]

CN115987176A - Method and device for carrying out zero-returning control on motor position and edge controller - Google Patents

Method and device for carrying out zero-returning control on motor position and edge controller Download PDF

Info

Publication number
CN115987176A
CN115987176A CN202310117931.9A CN202310117931A CN115987176A CN 115987176 A CN115987176 A CN 115987176A CN 202310117931 A CN202310117931 A CN 202310117931A CN 115987176 A CN115987176 A CN 115987176A
Authority
CN
China
Prior art keywords
zero
control
period
parameter
functional block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310117931.9A
Other languages
Chinese (zh)
Other versions
CN115987176B (en
Inventor
齐斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kyland Technology Co Ltd
Original Assignee
Kyland Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kyland Technology Co Ltd filed Critical Kyland Technology Co Ltd
Priority to CN202310117931.9A priority Critical patent/CN115987176B/en
Publication of CN115987176A publication Critical patent/CN115987176A/en
Application granted granted Critical
Publication of CN115987176B publication Critical patent/CN115987176B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The embodiment of the application relates to the technical field of intelligent manufacturing, in particular to a method and a device for carrying out zero returning control on a motor position and an edge controller. The method comprises the following specific scheme: configuring pin parameters of a PLCOPen functional block for executing zero returning control; acquiring a preset zero returning control mode based on the pin parameters; according to the preset zero returning control mode, carrying out zero returning control on the position of the motor by using a limit switch; and running a pre-configured interpolation algorithm in the functional block based on the pin parameter to control the motion of the mobile component in the process of executing zero returning control by the functional block. According to the embodiment of the application, zero return control is realized by configuring the pin parameters of the functional block based on the PLCOPen specification, the standardization of motion control can be realized, and the compatibility and the universality of the motion control function on different software and hardware platforms are improved.

Description

Method and device for carrying out zero-returning control on motor position and edge controller
Technical Field
The invention relates to the technical field of intelligent manufacturing, in particular to a method and a device for carrying out zero returning control on a motor position and an edge controller.
Background
Along with the development of intelligent manufacturing, the market demands for high-end intelligent manufacturing are more and more urgent in recent years. Especially the need for motion control is more stringent. However, most of the controllers and motion control algorithm libraries used by the existing intelligent manufacturing on the market are not opened by source codes. At present, secondary development and application are mostly carried out on the basis of an algorithm library. For example, the PLCOpen specification aims to standardize motion control, and can increase compatibility and reusability of motion control functions to different software and hardware platforms. But there is less development in current applications for motion libraries that conform to the PLCOpen specification. Taking the zeroing control function as an example, there is no motion control function block meeting the PLCOpen specification at present, so that the compatibility and the universality of the motion control function on different software and hardware platforms are poor.
Disclosure of Invention
In view of the above problems in the prior art, embodiments of the present application provide a method and an apparatus for performing zero-returning control on a motor position, and an edge controller, where zero-returning control is implemented by configuring a pin parameter of a function block based on a PLCOpen specification, so that standardization of motion control can be implemented, and compatibility and universality of a motion control function on different software and hardware platforms are increased.
The above object is achieved, and a first aspect of the present application provides a method for performing zero-returning control on a motor position, including:
configuring pin parameters of a PLCOPen functional block for executing zero returning control;
acquiring a preset zero returning control mode based on the pin parameters;
according to the preset zero-returning control mode, carrying out zero-returning control on the position of the motor by using a limit switch; and running a pre-configured interpolation algorithm in the functional block based on the pin parameter to control the motion of the mobile component in the process of executing zero returning control by the functional block.
As a possible implementation manner of the first aspect, the preset zero-returning control manner includes: the zeroing is completed when the sensor is ON, the zeroing is completed when the sensor is OFF, and the zeroing is completed when the rising edge triggers or the zeroing is completed when the falling edge triggers.
As a possible implementation manner of the first aspect, the running a pre-configured interpolation algorithm in the functional block based on the pin parameter to perform motion control on the moving component includes:
aiming at each control period of operation control, operating a pre-configured interpolation algorithm and calculating the speed increment of the period;
calculating the pulse number output in the period by using the speed increment of the period;
and controlling the motion of the moving part by using the pulse number output in the period.
As a possible implementation manner of the first aspect, the pin parameter includes a torque limit parameter and a speed parameter when searching for a switch;
the operating a preconfigured interpolation algorithm to calculate the present cycle speed increment includes:
calculating the acceleration value of the period according to the torque limiting parameter;
and calculating the speed increment of the period according to the speed parameter when the switch is searched and the acceleration value of the period.
As a possible implementation manner of the first aspect, the pin parameter includes a return-to-zero distance limit parameter and a speed parameter when searching for a switch;
the calculating the number of pulses output in the present cycle by using the speed increment in the present cycle includes:
and calculating the pulse number output in the period according to the zero-returning distance limiting parameter, the speed parameter during searching for the switch and the speed increment in the period.
As a possible implementation manner of the first aspect, the method further includes:
and under the condition that the preset zero returning control mode is zero returning completion when rising edge is triggered or zero returning completion when falling edge is triggered, if the limit switch is in a trigger state, the movable part is controlled to move reversely to the position for triggering the limit switch after leaving the position for triggering the limit switch.
This application second aspect provides a device of zero control returns to motor position includes:
the configuration unit is used for configuring the pin parameters of the PLCOPen functional block aiming at the PLCOPen functional block executing the zero returning control;
the acquisition unit is used for acquiring a preset zero-returning control mode based on the pin parameters;
the control unit is used for carrying out zero returning control on the position of the motor by using the limit switch according to the preset zero returning control mode; and running a pre-configured interpolation algorithm in the functional block based on the pin parameter to control the motion of the mobile component in the process of executing zero returning control by the functional block.
As a possible implementation manner of the second aspect, the preset zero-returning control manner includes: the zeroing is completed when the sensor is ON, the zeroing is completed when the sensor is OFF, and the zeroing is completed when the rising edge triggers or the zeroing is completed when the falling edge triggers.
As a possible implementation manner of the second aspect, the control unit includes:
the first calculating subunit is used for operating a pre-configured interpolation algorithm aiming at each control cycle of operation control and calculating the speed increment of the cycle;
the second calculating subunit is used for calculating the pulse number output in the current period by using the speed increment in the current period;
and the control subunit is used for controlling the motion of the moving part by utilizing the pulse number output in the period.
As a possible implementation manner of the second aspect, the pin parameter includes a torque limit parameter and a speed parameter when searching for a switch;
the first computing subunit is to:
calculating the acceleration value of the period according to the torque limiting parameter;
and calculating the speed increment of the period according to the speed parameter when the switch is searched and the acceleration value of the period.
As a possible implementation manner of the second aspect, the pin parameter includes a return-to-zero distance limit parameter and a speed parameter when searching for a switch;
the second computing subunit is to:
and calculating the pulse number output in the period according to the zero returning distance limiting parameter, the speed parameter during searching for the switch and the speed increment in the period.
As a possible implementation manner of the second aspect, the control unit is configured to:
and under the condition that the preset zero returning control mode is zero returning completion when rising edge is triggered or zero returning completion when falling edge is triggered, if the limit switch is in a trigger state, the movable part is controlled to move reversely to the position for triggering the limit switch after leaving the position for triggering the limit switch.
A third aspect of the present application provides an edge controller comprising the apparatus for controlling a zero-return of a motor position according to any one of the second aspects.
A fourth aspect of the present application provides a computing device comprising:
a communication interface;
at least one processor coupled with the communication interface; and
at least one memory coupled to the processor and storing program instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of any of the first aspects.
A fifth aspect of the present application provides a computer readable storage medium having stored thereon program instructions that, when executed by a computer, cause the computer to perform the method of any of the first aspects described above.
These and other aspects of the invention will be apparent from and elucidated with reference to the embodiment(s) described hereinafter.
Drawings
The various features and the connections between the various features of the present invention are further described below with reference to the attached figures. The figures are exemplary, some features are not shown to scale, and some of the figures may omit features that are conventional in the art to which the application relates and are not essential to the application, or show additional features that are not essential to the application, and the combination of features shown in the figures is not intended to limit the application. In addition, the same reference numerals are used throughout the specification to designate the same components. The specific drawings are illustrated as follows:
fig. 1 is a schematic diagram illustrating an embodiment of a method for performing zero-return control on a motor position according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a packaged PLCOpen functional block according to an embodiment of a method for controlling a motor position to return to zero according to the embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an embodiment of a method for controlling a zero return of a position of a motor according to an embodiment of the present disclosure;
fig. 4 is a flowchart of an interpolation algorithm of an embodiment of a method for controlling zero returning of a motor position according to the present disclosure;
fig. 5 is a flowchart of an interpolation algorithm of an embodiment of a method for controlling a motor position to return to zero according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart of an implementation of an embodiment of a method for performing zero-returning control on a motor position according to an embodiment of the present disclosure;
fig. 7 is a schematic flowchart of an implementation of an embodiment of a method for performing zero-returning control on a motor position according to an embodiment of the present disclosure;
fig. 8 is a schematic flowchart of an implementation of an embodiment of a method for performing zero-returning control on a motor position according to an embodiment of the present disclosure;
fig. 9 is a schematic flowchart of an implementation of an embodiment of a method for performing zero-returning control on a motor position according to an embodiment of the present disclosure;
FIG. 10 is a schematic diagram of an embodiment of an apparatus for controlling a motor position to return to zero according to an embodiment of the present disclosure;
FIG. 11 is a schematic diagram of an embodiment of an apparatus for controlling a motor position to return to zero according to an embodiment of the present disclosure;
fig. 12 is a schematic diagram of a computing device provided in an embodiment of the present application.
Detailed Description
The terms "first, second, third and the like" or "module a, module B, module C and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order, it being understood that specific orders or sequences may be interchanged where permissible to effect embodiments of the present application in other than those illustrated or described herein.
In the following description, reference to reference numerals indicating steps, such as S110, S120 … …, etc., does not necessarily indicate that the steps are performed in this order, and the order of the preceding and following steps may be interchanged or performed simultaneously, where permitted.
The term "comprising" as used in the specification and claims should not be construed as being limited to the contents listed thereafter; it does not exclude other elements or steps. It should therefore be interpreted as specifying the presence of the stated features, integers, steps or components as referred to, but does not preclude the presence or addition of one or more other features, integers, steps or components, and groups thereof. Thus, the expression "an apparatus comprising the devices a and B" should not be limited to an apparatus consisting of only the components a and B.
Reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but may. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments, as would be apparent to one of ordinary skill in the art from this disclosure.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. In the case of inconsistency, the meaning described in the present specification or the meaning derived from the content described in the present specification shall control. In addition, the terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application. To accurately describe the technical content in the present application and to accurately understand the present invention, terms used in the present specification are given the following explanation or definition before describing the specific embodiments:
1) PLCOPen: the PLCopen motion control specification specifies a separate library of function blocks. This provides a standard command set while hiding the underlying architecture and complexity (referred to as abstraction) from the user. This architecture can be used on many platforms and architectures. The application may be developed independently of the control architecture or brand, and the developer may decide which architecture to use at the end of the development cycle. The benefit to the machine manufacturer is that the cost of supporting different platforms is low and the application software can be freely developed in an independent manner without compromising productivity. In addition, the system maintenance is easier and the education cycle is shorter.
2) An edge controller: an edge controller is a physical interface between IT (Information Technology) and OT (Operational Technology). On the basis of finishing the control function of a workstation or a production line, the interface capability and the computing capability of the industrial equipment are improved, and the applicability of the industrial equipment is improved.
3) IEC 61131-3: is part 3 of the IEC61131 standard established by the International Electrotechnical Commission (IEC) in 12 months 1993, and is a standard for standardizing a programming system of a Programmable Logic Controller (PLC), and the application of the IEC61131-3 standard has become a trend in the field of industrial control. In the aspect of PLC, the editing software only needs to meet the IEC61131-3 international standard specification, and a program which can be understood by anyone can be established by the language architecture meeting all standards.
The prior art method is described first, and then the technical solution of the present application is described in detail.
Along with the development of intelligent manufacturing, the market demands for high-end intelligent manufacturing are more and more urgent in recent years. Especially the need for motion control is more stringent. However, most of the controllers and motion control algorithm libraries used by the existing intelligent manufacturing on the market are not opened by source codes. At present, secondary development and application are mostly carried out on the basis of an algorithm library. For example, the PLCOpen specification aims to standardize motion control, and can increase the compatibility and reusability of motion control functions to different software and hardware platforms. But less development is currently made in applications for motion libraries that conform to the PLCOpen specification. Taking the zeroing control function as an example, there is no motion control function block meeting the PLCOpen specification at present, so that the compatibility and the universality of the motion control function on different software and hardware platforms are poor.
The prior art has the following defects: for the zero-returning control function, at present, no motion control function block meeting the PLCOpen specification exists, so that the compatibility and the universality of the motion control function on different software and hardware platforms are poor.
Based on the technical problems in the prior art, the application provides a method and a device for carrying out zero return control on the position of a motor and an edge controller. The method is based on the input and output pin configuration conforming to the PLCOPen standard, the PLCOPen functional block is packaged, zero return control is realized by configuring the pin parameters of the functional block based on the PLCOPen standard, the standardization of motion control can be realized, the compatibility and the reusability of the motion control function to different software and hardware platforms can be increased, and the technical problem that the compatibility and the universality of the motion control function to different software and hardware platforms are poor in the prior art is solved.
Fig. 1 is a schematic diagram of an embodiment of a method for performing zero-returning control on a motor position according to an embodiment of the present disclosure. As shown in fig. 1, the method may include:
step S110, aiming at a PLCOPen functional block executing zero returning control, configuring pin parameters of the functional block;
step S120, acquiring a preset zero returning control mode based on the pin parameters;
step S130, carrying out zero returning control on the position of the motor by using a limit switch according to the preset zero returning control mode; and running a pre-configured interpolation algorithm in the functional block based on the pin parameter to control the motion of the mobile component in the process of executing zero returning control by the functional block.
The PLCOpen specification is a motion control specification based on the IEC61131-3 function block base. This specification includes the behavior of function block interfaces and axis motion. A multi-axis motion control system involves a number of components including servo drives and motors. They constitute a distributed control system. The method for realizing the zero-returning control provided by the embodiment of the application can be executed in the edge controller of the distributed control system. For example, a motion control algorithm library may be deployed in the edge controller, including PLCOpen functional blocks that implement various control functions. The PLCOPen functional block in the edge controller runs an interpolation algorithm, outputs a motion control instruction to the servo driver and the motor in each motion control period, and controls the motion of the moving part through the servo driver and the motor. Among them, motion Control (MC), also called electric drive Control, is used. The motion control is based on a motor, and realizes control of a moving member for a change in physical quantity such as angular displacement, speed, torque, and the like.
Fig. 2 is a schematic diagram of a packaged PLCOpen functional block according to an embodiment of a method for controlling zero returning of a motor position provided in the embodiment of the present application. Hereinafter, the "PLCOpen function block" is simply referred to as a function block. In the PLCOpen specification, motion control functions may be packaged as functional blocks in the form of input and output pins. Pins may include various configuration parameters for motion control, and the functions called by software may be implemented using pins. Wherein one PLCOpen function can implement motion control on a single axis. In multi-axis motion control, multiple function blocks may be used to implement motion control accordingly. Wherein each axis is motion controlled by its corresponding PLCOpen function. Referring to fig. 2, the encapsulated PLCOpen function block is named MC _ steplimit switch, and the function of the function block includes using a limit switch to implement zero return. The pin configuration of this functional block is introduced as follows:
1) Input and output pins:
AxisID: and the axis number is an input and output signal.
2) Input pin
Execution: the rising edge triggers a signal, and the corresponding shaft starts to move when the rising edge is generated.
Direction: the direction option has the following two values:
taking the value of 1: searching a positive limit switch in the positive direction;
taking the value as 2: negative limit switches are searched in the reverse direction.
LimitSwitchMode: the switch mode has the following four values:
taking the value 1: the return to zero is completed when the sensor is ON;
taking the value of 2: zeroing is completed when the sensor is OFF;
value 3: the zero returning is completed when the rising edge is triggered;
taking the value of 4: and the zero returning is completed when the falling edge triggers.
Velocity: the speed when searching for the switch is in u/s. Where u may be a user-defined unit (unit).
SetPositation: and the unit of the current position set when the zero returning is completed is u. Likewise, u may be a user-defined unit.
Torque Limit: torque limit in percent.
TimeLimit: a time limit of zeroing.
DistaneLimit: a return-to-zero distance limit.
Buffer mode: the blending mode belongs to the linking management with other modules and has the following two values:
value 0: the last module is interrupted and the operation is carried out immediately;
taking the value of 1: and immediately operating the last module after the operation of the last module is finished.
Under the condition of taking the value of 0, the last module can be cached, and the last module is operated after the operation of the module is finished; for example, the last module may be a function block that controls the movement of the moving part by a set distance.
Tsm: the running period of the module is unit second.
Positivefimitswitch: and taking the value of the positive limit switch.
NegativeLimitSwitch: and taking the value of the negative limit switch.
For the positive limit switch value and the negative limit switch value, in one example, the value of 1 represents ON, i.e. represents the state of triggering; a value of 0 indicates OFF, i.e. a state without triggering. When the moving part touches the limit switch, the driver or the controller connected with the limit switch sends a signal to change the value of the preset variable in the driver to 1, and then the value is assigned to the PositiveLimitSwitch variable. The function block then controls the moving part to stop moving.
3) Output pin
Done: the zeroing function is completed.
Busy: the zeroing function is in progress.
Active: the zero-return action is in progress.
Commandbooted: the return to zero function is interrupted.
Error: the function block reports an error.
ErrorID: the function block reports an error number.
The various variables of the above output pins correspond to the various situations possible in the result of the return-to-zero function execution. For example, the function block may report an error when the time limit is exceeded or the distance limit is exceeded by zeroing. The user or other application program can obtain the variable values of the output pins and realize other control functions according to the variable values.
The PLCOPen function block can realize the function of standard motion control, and can plan the motion of the mobile part on line and carry out iterative control. The manner of iterative control may include: in each motion control period, a motion control instruction of the period is obtained according to the numerical value such as the pulse number of the previous period. And realizing accurate and stable operation control through iterative control of each motion control period.
Referring to the examples of fig. 1 and 2, in step S110, various pin parameters of the function block may be configured for the PLCOpen function block that performs the zero-back control. For example, the value of the target speed Vi entered by the user may be configured to the Velocity variable in the input pin. As another example, the value of the walking distance Si input by the user may be configured to the DistanceLimit variable in the input pin. For another example, the user may configure the value of the LimitSwitchMode variable according to different conditions of the system software and hardware. The return to zero control mode employed during motion control may be indicated by the value of the LimitSwitchMode variable.
In one embodiment, the preset zero-returning control mode includes: the zeroing is completed when the sensor is ON, the zeroing is completed when the sensor is OFF, and the zeroing is completed when the rising edge triggers or the zeroing is completed when the falling edge triggers.
Referring to the introduction of the pin configuration of the functional block, when the value of the DistanceLimit variable is 1, the indication adopts a zero-returning control mode as follows: zeroing is done when the sensor is ON. Similarly, when the value of the DistanceLimit variable is 2, the zero-returning control mode adopted by the instruction is as follows: zeroing is done when the sensor is OFF. The user can select the zeroing control mode adaptive to the hardware according to different conditions of different hardware, such as the NPN type and the PNP type.
The zero returning is finished when the sensor is ON, namely when the moving part touches a limit switch, the zero returning is finished when the state of the sensor is changed into ON (the value is 1); the completion of zero return when the sensor is OFF means that zero return is completed when the sensor state is OFF (value 0) when the moving member hits the limit switch.
Referring to the introduction of the pin configuration of the functional block, when the value of the DistanceLimit variable is 3, the indication adopts a zero-returning control mode as follows: the zeroing is completed when the rising edge triggers. When the variable value of DistanceLimit is 4, the zero-returning control mode adopted by the indication is as follows: and the zero returning is completed when the falling edge triggers. Similarly, the user can select the zero-returning control mode adapted to the hardware according to different situations of different hardware, such as different based on NPN type and PNP type.
When the moving component touches the limit switch, the limit switch is changed into a triggered state. A rising or falling edge will occur from the moment when there is no trigger to the moment when this action is triggered. When the moving member touches the limit switch, if the sensor state is ON (value 1), a rising edge is generated from the moment when the sensor is not triggered to the moment when the sensor triggers the action; when the sensor state is turned OFF (value is 0) when the moving member hits the limit switch, a falling edge occurs from the moment when the sensor is not triggered to the moment when the sensor is triggered. The zero returning is completed when the rising edge is triggered, namely when the moving part moves to a certain position and detects the rising edge, the zero returning is triggered to be completed; the zero returning is completed when the falling edge is triggered, which means that the zero returning is triggered and completed when the moving part moves to a certain position and detects the falling edge.
In step S120, a preset zeroing control manner may be obtained based on a value of a DistanceLimit variable in the pin parameter of the PLCOpen function block. In step S130, the PLCOpen function performs zero-return control on the motor position by using the limit switch according to the preset zero-return control mode obtained in step S120. And in the process of executing zero returning control by the PLCOPen functional block, running a pre-configured interpolation algorithm in the functional block, and calculating by using the pin parameter in the interpolation algorithm to obtain a motion control instruction. And performing motion control on the moving part according to the motion control instruction.
Typically, position-controlled servo motors require a reference point to be determined prior to operation. The position coordinates of the servo motor are established based on the reference point. That is, the servo motor needs to determine a reference point in a position space where the motor operates. And determining the real-time position of the servo motor according to the reference point. This reference point is called the zero point and the process of determining this reference point is called zeroing. The position of the reference point may be determined by a limit switch. That is, the zero-return control of the motor position can be achieved using a limit switch. Specifically, when the moving part touches the limit switch to stop moving, the zero return control is completed. And the current value of the motor position may be set to a user pre-configured value when the moving member stops moving. The current position of the motor is then the above-mentioned reference point. The process of finding the reference point and setting the current value of the motor position is the process of zeroing.
According to the embodiment of the application, zero return control is realized by configuring the pin parameters of the functional block based on the PLCOPen specification, the standardization of motion control can be realized, and the compatibility and the universality of the motion control function on different software and hardware platforms are improved.
Fig. 3 is a schematic diagram of an embodiment of a method for performing zero-return control on a motor position according to an embodiment of the present disclosure. In one embodiment, as shown in fig. 3, in step S130 in fig. 1, the running a preconfigured interpolation algorithm in the functional block based on the pin parameter to control the motion of the moving component includes:
step S210, aiming at each control period of operation control, operating a pre-configured interpolation algorithm and calculating the speed increment of the period;
step S220, calculating the pulse number output in the period by using the speed increment of the period;
in step S230, the movement of the moving member is controlled by the number of pulses output in the present period.
In one example, the zeroing control may employ a T-type acceleration and deceleration scheme. T-type acceleration and deceleration belongs to the category of pulse increment interpolation and belongs to one of interpolation algorithms. The T-shaped acceleration and deceleration curve is the most common acceleration and deceleration mode, acceleration keeps a constant value in the acceleration and deceleration stages, and the mode is simple in calculation and high in efficiency. The T-shaped velocity profile includes three phases: the acceleration section Ta, the constant speed section Tm and the deceleration section Td, and the acceleration a is kept unchanged during acceleration and deceleration. The T-type acceleration and deceleration algorithm is a light algorithm and takes pulses as a measurement unit. Wherein the distance can be represented by the number of pulses. Because the number of pulses corresponding to one rotation of the motor is a fixed value, the distance can be expressed by the number of pulses by taking the pulses as a measurement unit. The T-type acceleration and deceleration algorithm can change the target speed and the target acceleration at any time in the motion process, has the pause function, has the advantage of high motion precision, and is particularly suitable for various pulse control motion scenes.
In each motion control period, a preset interpolation algorithm is operated in the PLCOPen functional block, and iterative control is carried out on the mobile component. Specifically, in step S210, the interpolation algorithm shown in fig. 4 may be used to calculate the speed increment of the present cycle; in step S220, the number of pulses output in the present cycle is calculated by the interpolation algorithm shown in fig. 5 using the speed increment in the present cycle calculated in step S210; in step S230, the number of pulses output in the present cycle calculated in step S220 is used as a motion control instruction, the motion control instruction is output to the servo driver and the motor, and the motion of the moving member is controlled by the servo driver and the motor.
The symbols in fig. 4 and 5 are illustrated as follows:
vt: unit cycle speed, i.e., the cycle position increment; the "unit cycle" in the following description refers to the "present cycle", that is, the present cycle.
Vt': the Vt of the last cycle.
Vr: and the unit period target speed is the target speed of the current period.
Vdelta: unit cycle speed increments.
a: acceleration.
Sd: the number of pulses required to decelerate to a speed of 0 at the current speed and acceleration.
Sd': sd of the last cycle.
Tsm: time of a single run cycle, in seconds.
Srest: the number of pulses needed to walk remains.
Sready: the number of pulses that have gone.
Sready': the number of pulses that have gone through in the previous cycle.
And Vi: target speed of user input (converted to single cycle);
the function block enables the moving part to reach the final target speed through iterative control of a plurality of motion control cycles, and the final target speed can be converted into a single cycle to obtain the target speed of the single cycle.
Where Vr is the target speed in the calculation process, and Vr and Vi are not necessarily equal. During acceleration, vr is equal to Vi; during deceleration, vr may be equal to 0.
Si: the walking distance (converted to pulses) entered by the user.
Pdelta: the number of pulses output in this period.
The motion mode of the linear interpolation algorithm used in the embodiment of the present application is unidirectional acceleration and deceleration, and when the motion direction is reverse, only the negative sign of Pdelta is needed, and the flow shown in fig. 4 and 5 can still be used for performing the correlation calculation.
In one embodiment, the pin parameters include a torque limit parameter and a speed parameter when searching for a switch;
the operating a preconfigured interpolation algorithm to calculate the present cycle speed increment includes:
calculating the acceleration value of the period according to the torque limiting parameter;
and calculating the speed increment of the period according to the speed parameter when the switch is searched and the acceleration value of the period.
Referring to the pin configuration description in the example of fig. 2, the pin parameters include a torque limit parameter TorqueLimit and a speed parameter Velocity when searching for a switch. When the parameters of each pin of the function block are configured in step S110, the value of the target speed Vi input by the user is configured to the Velocity variable in the input pin. Referring to the flow shown in fig. 4, the value of the Velocity variable when searching for a switch in the pin parameters of the functional block is obtained, that is, vi. Vi is a target speed configured by a user, and the Vi is converted into a single cycle, so that the target speed of each motion control cycle can be obtained, namely the target speed Vr of a unit cycle. In the flow of fig. 4, it is first determined whether Vt < Vr. According to the magnitude relation of Vt and Vr, the algorithm executes different branches under three different conditions of Vt < Vr, vt = Vr and Vt > Vr respectively. Wherein, the moving part is controlled to do accelerated motion under the condition that Vt < Vr; controlling the moving part to move at a constant speed under the condition that Vt = Vr; and controlling the moving part to do deceleration movement under the condition that Vt is larger than Vr.
Referring to fig. 4, in the case Vt < Vr, first, the unit cycle speed increment Vdelta is calculated using the following formula (1):
Vdelta = a*Tsm (1)
wherein, in the pin parameters of the PLCOPen functional block, the user configures a torque limit parameter. The torque limiting parameter is the derivative of the acceleration. The value of TorqueLimit is obtained from the pin parameter, from which the value of acceleration a can be obtained. Then, the value of the acceleration a is substituted into the above formula (1), and the velocity increment Vdelta per unit cycle is calculated. Next, vdelta-Vt is assigned to Vdelta in the case of Vdelta + Vt > Vr. In the case of Vdelta + Vt > Vr, the speed exceeds the unit cycle target speed Vr if the speed is accelerated according to Vdelta calculated by the formula (1). In this case, therefore, vr-Vt is assigned to Vdelta so that the speed of the moving part just reaches the unit cycle target speed Vr, achieving the desired control target. Finally, the number Sd of pulses required to decelerate to a speed of 0 is calculated using the formula Sd = Sd' + Vt + Vdelta.
Referring to fig. 4, in the case of Vt = Vr, vdelta =0 since the moving member makes a uniform motion.
Referring to fig. 4, in the case where Vt > Vr, first, the unit cycle speed increment Vdelta is calculated using formula (1). Next, vr-Vt is assigned to Vdelta in the case of Vt-Vdelta < Vr. In the case where Vt-Vdelta < Vr, the speed may be less than the unit cycle target speed Vr if the speed is decelerated according to Vdelta calculated by equation (1). In this case, therefore, vr-Vt is assigned to Vdelta so that the speed of the moving member just reaches the unit cycle target speed Vr, and the desired control target is achieved. Finally, the number Sd of pulses required to decelerate to a speed of 0 is calculated using the formula Sd = Sd' -Vt-Vdelta.
In summary, in the interpolation algorithm shown in fig. 4, the acceleration value a in the present period is calculated according to the torque limit parameter TorqueLimit, the above calculation procedure is executed according to the speed parameter Velocity when the switch is searched and the acceleration value a in the present period, the speed increment Vdelta in the present period is finally calculated, and the pulse number Sd required for decelerating to a speed of 0 at the current speed and acceleration is calculated.
In one embodiment, the pin parameters include a return-to-zero distance limit parameter and a speed parameter when searching for a switch;
the calculating the number of pulses output in the present cycle by using the speed increment in the present cycle includes:
and calculating the pulse number output in the period according to the zero returning distance limiting parameter, the speed parameter during searching for the switch and the speed increment in the period.
Referring to the flow shown in fig. 5, it is first determined whether there is a pause requirement in the motion control process. If there is a demand for a pause, vr is assigned to 0. If the pause requirement does not exist, judging whether Srest is less than Sd. Where Sd is the number of pulses necessary to decelerate to a speed of 0, which is calculated in the flow shown in fig. 4. And if the number of the remaining pulses Srest which need to walk is smaller than the number Sd of the pulses needed for decelerating to the speed of 0, assigning Vr to be 0. And if the number of the remaining pulses Srest which need to walk is larger than or equal to the number Sd of pulses needed for decelerating to 0, assigning the target speed Vi input by the user to the unit-period target speed Vr. The above flow is executed to obtain the value of Vr.
In the flow of fig. 5, the value of Vdelta may directly use the present cycle speed increment Vdelta calculated in the flow shown in fig. 4. That is, in the flow of fig. 5, vdelta and Sd calculated in the flow of fig. 4 are used as data participating in the calculation in the present flow, and the number of pulses output in the present period is finally obtained through subsequent calculation. In the flow of fig. 5, as for the relationship between the speed vector variable when the pin parameter of the functional block searches for the switch, the target speed Vi configured by the user, and the target speed Vr in the unit cycle, reference may be made to the related description of the flow of fig. 4, and details thereof are not repeated.
Referring to the flow shown in fig. 5, after obtaining values of Vr and Vdelta, it is next determined whether Vt < Vr. Assigning Vt '+ Vdelta to Vt in the case where Vt < Vr and Vr-Vt > = a, i.e., vt = Vt' + Vdelta; assigning Vt '-Vdelta to Vt in the case where Vt > Vr and Vr-Vt > = a, i.e., vt = Vt' -Vdelta; in the case of Vt = Vr, vt 'is assigned to Vt, i.e. Vt = Vt'. The above flow is executed to obtain the value of Vt.
Referring to the flow shown in fig. 5, after the value of Vt is obtained, it is next determined whether Vdelta + Vt > Vr. If yes, assigning the Srest to Pdelta, namely Pdelta = Srest, and ending the movement. If not, assigning the Vt to Pdelta, namely Pdelta = Vt; srest is then calculated using the following equations (2) and (3):
Sready = Sready’+Pdelta (2)
Srest = Si – Sready (3)
referring to the description of the pin configuration in the example of fig. 2, the pin parameter includes a distance limit to zero parameter DistanceLimit. When configuring each pin parameter of the function block in step S110, the user configures the value of the DistanceLimit variable. According to this configuration, the moving member can continue to move when the distance is not reached. Referring to formula (3) in fig. 5, the value of the zeroing distance limitation parameter DistanceLimit variable in the pin parameters of the functional block is obtained, that is, si. Substituting Si into the formula (3), and calculating to obtain the number Srest of the remaining pulses required to walk.
The above flow is executed to obtain the value of the pulse number Pdelta output in the present period. The value of Pdelta can be used as a motion control instruction to be output to the motor, and the pulse number for indicating the motor to walk in the period is the value of Pdelta. In addition, the number of pulses Srest which are left to be walked by executing the above flow can be used for calculation by using the data when the algorithm is executed in the next period.
In summary, in the interpolation algorithm shown in fig. 5, according to the zeroing distance limit parameter DistanceLimit, the speed parameter Velocity when searching for the switch, and the speed increment Vdelta in the current period calculated in the flow shown in fig. 4, the pulse number Pdelta output in the current period is finally calculated, and the number of pulses Srest remaining to be walked is calculated.
In the embodiment of the present application, the flow of implementing different values of the pin parameter LimitSwitchMode switch mode is respectively shown in fig. 6 to fig. 9. In the motion control process of each implementation flow, the interpolation algorithms shown in fig. 4 and 5 described above are used to perform motion control of acceleration and deceleration motions.
When the variable value of DistanceLimit is 1, indicating that the zero return control mode is as follows: the zeroing is completed when the sensor is ON, and the implementation flow is shown in fig. 6. In fig. 6, first, it is determined whether to return to zero in the forward Direction according to the value of the Direction variable of the pin parameter. If the positive direction returns to zero, detecting a positive limit switch; and if the current is negative, returning to zero, detecting the negative limit switch. Specifically, when the value of the Direction variable is 1, the Direction variable returns to zero in the positive Direction, and the positive limit switch is searched in the positive Direction; the Direction variable takes the value of 2, and returns to zero in the negative Direction, and the negative limit switch is searched in the negative Direction at the moment.
Referring to fig. 6, in the case that the result of detecting the positive limit switch is positive limit ON, the moving part has moved to the limit switch at this time, the limit switch is in a triggered state, and the motion control process is ended. When the result of detecting the positive limit switch is positive limit OFF, the moving part is controlled to move forward until the positive limit ON, and the motion control process is finished. Similarly, in the case that the result of detecting the negative limit switch is negative limit ON, at this time, the moving part has moved to the limit switch, the limit switch is in a triggered state, and the motion control process is ended. And under the condition that the result of detecting the negative limit switch is negative limit OFF, controlling the moving part to move in a negative direction until the motion control flow is finished when the negative limit is ON.
When the variable value of DistanceLimit is 2, the zero-returning control mode adopted by the indication is as follows: zeroing is done when the sensor is OFF. The implementation flow is shown in fig. 7. In fig. 7, first, it is determined whether to return to zero in the forward Direction according to the value of the Direction variable of the pin parameter. If the positive direction returns to zero, detecting a positive limit switch; if the negative direction returns to zero, the negative limit switch is detected. Specifically, when the value of the Direction variable is 1, the Direction variable returns to zero in the positive Direction, and the positive limit switch is searched in the positive Direction; the Direction variable takes the value of 2, and returns to zero in the negative Direction, and the negative limit switch is searched in the negative Direction at the moment.
Referring to fig. 7, in case that the result of detecting the positive limit switch is positive limit OFF, at this time, the moving part has moved to the limit switch, the limit switch is in a triggered state, and the motion control flow ends. When the positive limit switch is detected to be positive limit ON, the moving part is controlled to move forward until the positive limit is OFF, and the motion control process is finished. Similarly, in the case where the result of detecting the negative limit switch is negative limit OFF, the moving member has moved to the limit switch at this time, the limit switch is in a triggered state, and the motion control flow ends. And under the condition that the result of detecting the negative limit switch is negative limit ON, controlling the moving part to move in a negative direction until the negative limit OFF, and ending the motion control process.
Referring to the above examples of fig. 8 and 9, in one embodiment, the method further comprises:
and under the condition that the preset zero returning control mode is zero returning completion when rising edge is triggered or zero returning completion when falling edge is triggered, if the limit switch is in a trigger state, the movable part is controlled to move reversely to the position for triggering the limit switch after leaving the position for triggering the limit switch.
When the variable value of DistanceLimit is 3, the zero-returning control mode adopted by the indication is as follows: the zeroing is completed when the rising edge triggers. The implementation flow is shown in fig. 8. In fig. 8, first, it is determined whether the pin parameter Direction variable returns to zero. If the positive direction returns to zero, detecting a positive limit switch; and if the current is negative, returning to zero, detecting the negative limit switch.
Referring to fig. 8, when the result of detecting the positive limit switch is positive limit ON, at this time, the moving part has moved to the limit switch, and the limit switch is in the triggered state, the moving part is controlled to move in the negative direction until positive limit OFF, that is, the moving part leaves the position where the limit switch is triggered, and then the moving part is controlled to move in the opposite direction, that is, the moving part moves in the positive direction until a rising edge is detected, and the motion control process is ended. When the positive limit switch is detected to be positive limit OFF, the moving part is controlled to move forwards until the motion control process is finished when the rising edge is detected. Similarly, when the result of detecting the positive limit switch is negative limit ON, at this time, the moving part has moved to the limit switch, and the limit switch is in the triggered state, the moving part is controlled to move in the positive direction until positive limit OFF, that is, the moving part leaves the position where the limit switch is triggered, and then the moving part is controlled to move in the opposite direction, that is, the moving part moves in the negative direction until the rising edge is detected, and the motion control flow ends. And under the condition that the result of detecting the positive limit switch is negative limit OFF, controlling the moving part to move in a negative direction until the motion control flow is finished when a rising edge is detected.
When the variable value of DistanceLimit is 4, the zero-returning control mode adopted by the indication is as follows: and the zero returning is completed when the falling edge triggers. The implementation flow is shown in fig. 9. In fig. 9, first, it is determined whether the pin parameter Direction variable returns to zero. If the positive direction returns to zero, detecting a positive limit switch; and if the current is negative, returning to zero, detecting the negative limit switch.
Referring to fig. 9, when the result of detecting the positive limit switch is positive limit OFF, and at this time, the moving part has moved to the limit switch, and the limit switch is in a triggered state, the moving part is controlled to move in a negative direction until the positive limit is ON, that is, to leave the position where the limit switch is triggered, and then the moving part is controlled to move in an opposite direction, that is, to move in a positive direction until a falling edge is detected, and the motion control process is ended. And under the condition that the positive limit switch is detected to be positive limit ON, controlling the moving part to move forwards until the motion control process is finished when the falling edge is detected. Similarly, in the case that the result of detecting the negative limit switch is negative limit OFF, at this time, the moving part has moved to the limit switch, and the limit switch is in the triggered state, the moving part is controlled to move in the positive direction until the negative limit ON, that is, the moving part leaves the position where the limit switch is triggered, and then the moving part is controlled to move in the opposite direction, that is, the moving part moves in the negative direction until the falling edge is detected, and the motion control flow ends. And under the condition that the result of detecting the negative limit switch is negative limit ON, controlling the moving part to move in a negative direction until the motion control process is finished when the falling edge is detected.
In the above zero-returning control modes, the examples of fig. 6 and 7 implement the triggering of the limit switch according to the high and low of the level, and the examples of fig. 8 and 9 implement the triggering of the limit switch according to the rising edge and the falling edge. In comparison, the control accuracy of the manner in which the trigger of the limit switch is implemented according to the rising edge and the falling edge is higher than that of the manner in which the trigger of the limit switch is implemented according to the level. In the mode of realizing the triggering of the limit switch according to the level, the moving part has a certain width size, and the triggering and zero returning can be finished no matter which part of the moving part touches the limit switch. Thus, the control accuracy of this approach is limited by contrast. In specific applications, a user can configure a zeroing control mode according to actual control requirements.
Referring to the flow of fig. 6 to 9, when the moving member touches the limit switch to stop moving, the zero-returning control is completed. The current value of the motor position is set to the value in the user-configured pin parameter SetPosition variable after zeroing. For example, if the user-configured SetPosition variable has a value of zero, the current value of the motor position is cleared.
In summary, the embodiment of the present application executes an interpolation algorithm according to the input/output pin parameter of the PLCOpen functional block based on the PLCOpen specification, so that the motor can smoothly accelerate or decelerate or pause, and plays roles in precise control and stabilization. Based on the PLCOPen functional block, the position of the motor is subjected to zero returning control by using a limit switch, the standardization of motion control can be realized, and the compatibility and the universality of the motion control function on different software and hardware platforms are improved.
As shown in fig. 10, the present application also provides a corresponding embodiment of an apparatus for performing a zero-return control on a motor position. For the beneficial effects or the technical problems to be solved by the apparatus, reference may be made to the description of the method corresponding to each apparatus, or to the description in the summary of the invention, which is not repeated herein.
In an embodiment of the apparatus for zero-return control of motor position, the apparatus comprises:
a configuration unit 100, configured to configure, for a PLCOpen functional block that performs zero-returning control, a pin parameter of the functional block;
an obtaining unit 200, configured to obtain a preset zero-returning control mode based on the pin parameter;
the control unit 300 is used for carrying out zero returning control on the position of the motor by using a limit switch according to the preset zero returning control mode; and running a pre-configured interpolation algorithm in the functional block based on the pin parameter to control the motion of the mobile component in the process of executing zero returning control by the functional block.
In one embodiment, the preset zero-returning control mode includes: zeroing is completed when the sensor is ON, zeroing is completed when the sensor is OFF, zeroing is completed when rising edge triggers or zeroing is completed when falling edge triggers.
As shown in fig. 11, in one embodiment, the control unit 300 includes:
a first calculating subunit 310, configured to operate a preconfigured interpolation algorithm for each control cycle of operation control, and calculate a speed increment of the cycle;
a second calculating subunit 320, configured to calculate the number of pulses output in the present period by using the speed increment in the present period;
and a control subunit 330, configured to perform motion control on the moving component by using the number of pulses output in the present period.
In one embodiment, the pin parameters include a torque limit parameter and a speed parameter when searching for a switch;
the first calculating subunit 310 is configured to:
calculating the acceleration value of the period according to the torque limiting parameter;
and calculating the speed increment of the period according to the speed parameter when the switch is searched and the acceleration value of the period.
In one embodiment, the pin parameters include a return-to-zero distance limit parameter and a speed parameter when searching for a switch;
the second calculating subunit 320 is configured to:
and calculating the pulse number output in the period according to the zero returning distance limiting parameter, the speed parameter during searching for the switch and the speed increment in the period.
In one embodiment, the control unit 300 is configured to:
and under the condition that the preset zero returning control mode is zero returning completion when rising edge is triggered or zero returning completion when falling edge is triggered, if the limit switch is in a trigger state, the movable part is controlled to move reversely to the position for triggering the limit switch after leaving the position for triggering the limit switch.
The application also provides a corresponding embodiment of the edge controller. The edge controller comprises any one of the above-mentioned devices for performing zero-return control on the position of the motor. A motion control algorithm library may be deployed in the edge controller, including PLCOpen function blocks that implement various control functions. The method for realizing the zero-returning control provided by the embodiment of the application is executed in the PLCOPen functional block. For the beneficial effects or the technical problems to be solved of the edge controller, reference may be made to the description of the methods respectively corresponding to the apparatuses, or to the description in the summary of the invention, and details are not repeated here.
Fig. 12 is a schematic structural diagram of a computing device 900 provided in an embodiment of the present application. The computing device 900 includes: a processor 910, a memory 920, and a communication interface 930.
It is to be appreciated that the communication interface 930 in the computing device 900 shown in fig. 12 may be used to communicate with other devices.
The processor 910 may be connected to the memory 920. The memory 920 may be used to store the program codes and data. Therefore, the memory 920 may be a storage unit inside the processor 910, an external storage unit independent of the processor 910, or a component including a storage unit inside the processor 910 and an external storage unit independent of the processor 910.
Optionally, computing device 900 may also include a bus. The memory 920 and the communication interface 930 may be connected to the processor 910 through a bus. The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc.
It should be understood that, in the embodiment of the present application, the processor 910 may adopt a Central Processing Unit (CPU). The processor may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Or the processor 910 is implemented by one or more integrated circuits, and is configured to execute the relevant programs to implement the technical solutions provided in the embodiments of the present application.
The memory 920 may include a read-only memory and a random access memory, and provides instructions and data to the processor 910. A portion of the processor 910 may also include non-volatile random access memory. For example, the processor 910 may also store information of the device type.
When the computing device 900 is running, the processor 910 executes the computer-executable instructions in the memory 920 to perform the operational steps of the above-described method.
It should be understood that the computing device 900 according to the embodiment of the present application may correspond to a corresponding main body for executing the method according to the embodiments of the present application, and the above and other operations and/or functions of each module in the computing device 900 are respectively for implementing corresponding flows of each method of the embodiment, and are not described herein again for brevity.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The present embodiments also provide a computer-readable storage medium, on which a computer program is stored, the program being used for executing a diversification problem generation method when executed by a processor, the method including at least one of the solutions described in the above embodiments.
The computer storage media of embodiments of the present application may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, 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), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code 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).
It should be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention.

Claims (10)

1. A method of zero-return control of a motor position, comprising:
configuring pin parameters of a PLCOPen functional block for executing zero returning control;
acquiring a preset zero returning control mode based on the pin parameters;
according to the preset zero returning control mode, carrying out zero returning control on the position of the motor by using a limit switch; and running a pre-configured interpolation algorithm in the functional block based on the pin parameter to control the motion of the mobile component in the process of executing zero returning control by the functional block.
2. The method of claim 1, wherein the preset zero-returning control mode comprises: zeroing is completed when the sensor is ON, zeroing is completed when the sensor is OFF, zeroing is completed when rising edge triggers or zeroing is completed when falling edge triggers.
3. The method according to claim 1 or 2, wherein the running of a preconfigured interpolation algorithm in the functional block for motion control of a moving component based on the pin parameter comprises:
aiming at each control period of operation control, operating a pre-configured interpolation algorithm, and calculating the speed increment of the period;
calculating the pulse number output in the period by using the speed increment of the period;
and controlling the motion of the moving part by using the pulse number output in the period.
4. The method of claim 3, wherein the pin parameters include a torque limit parameter and a speed parameter when searching for a switch;
the operating a preconfigured interpolation algorithm to calculate the present cycle speed increment includes:
calculating the acceleration value of the period according to the torque limiting parameter;
and calculating the speed increment of the period according to the speed parameter when the switch is searched and the acceleration value of the period.
5. The method of claim 3, wherein the pin parameters include a return-to-zero distance limit parameter and a speed parameter when searching for a switch;
the calculating the number of pulses output in the present period by using the speed increment of the present period includes:
and calculating the pulse number output in the period according to the zero-returning distance limiting parameter, the speed parameter during searching for the switch and the speed increment in the period.
6. The method of claim 2, further comprising:
and under the condition that the preset zero returning control mode is zero returning completion when rising edge is triggered or zero returning completion when falling edge is triggered, if the limit switch is in a trigger state, the movable part is controlled to move reversely to the position for triggering the limit switch after leaving the position for triggering the limit switch.
7. An apparatus for zero-return control of motor position, comprising:
the configuration unit is used for configuring the pin parameters of the PLCOPen functional block aiming at the PLCOPen functional block executing the zero returning control;
the acquisition unit is used for acquiring a preset zero returning control mode based on the pin parameters;
the control unit is used for carrying out zero return control on the position of the motor by utilizing the limit switch according to the preset zero return control mode; and running a pre-configured interpolation algorithm in the functional block based on the pin parameter to control the motion of the mobile component in the process of executing zero returning control by the functional block.
8. An edge controller comprising the apparatus for controlling the zeroing of a position of a motor according to claim 7.
9. A computing device, comprising:
a communication interface;
at least one processor coupled with the communication interface; and
at least one memory coupled with the processor and storing program instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of any of claims 1-6.
10. A computer-readable storage medium having stored thereon program instructions that, when executed by a computer, cause the computer to perform the method of any of claims 1-6.
CN202310117931.9A 2023-02-01 2023-02-01 Method and device for carrying out zero return control on motor position and edge controller Active CN115987176B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310117931.9A CN115987176B (en) 2023-02-01 2023-02-01 Method and device for carrying out zero return control on motor position and edge controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310117931.9A CN115987176B (en) 2023-02-01 2023-02-01 Method and device for carrying out zero return control on motor position and edge controller

Publications (2)

Publication Number Publication Date
CN115987176A true CN115987176A (en) 2023-04-18
CN115987176B CN115987176B (en) 2023-09-12

Family

ID=85976254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310117931.9A Active CN115987176B (en) 2023-02-01 2023-02-01 Method and device for carrying out zero return control on motor position and edge controller

Country Status (1)

Country Link
CN (1) CN115987176B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001275397A (en) * 2000-03-27 2001-10-05 Yazaki Corp Stepper motor drive control circuit
CN103454979A (en) * 2013-09-11 2013-12-18 大连理工计算机控制工程有限公司 Quick variable-speed curve circular interpolation method packaged into PLCopen instruction
CN103941650A (en) * 2014-04-18 2014-07-23 华南理工大学 Logic and movement integrated controller
US20170279702A1 (en) * 2016-03-25 2017-09-28 Dropbox, Inc. System and method for automated issue remediation for information technology infrastructure
CN108582082A (en) * 2018-07-04 2018-09-28 北京镁伽机器人科技有限公司 Robot, back to zero position method, system with accurate back to zero bit function and medium
CN109062145A (en) * 2018-08-13 2018-12-21 大古智能科技(上海)有限公司 Numerically-controlled machine tool motion control card based on WIFI communication
CN109313687A (en) * 2016-01-24 2019-02-05 赛义德·卡姆兰·哈桑 AI-based computer security
CN114296393A (en) * 2021-12-29 2022-04-08 北京半导体专用设备研究所(中国电子科技集团公司第四十五研究所) Zero-returning method and device for motion platform, electronic equipment and storage medium
CN114995536A (en) * 2022-08-08 2022-09-02 广东科伺智能科技有限公司 Motion controller for servo motor
CN115453967A (en) * 2022-10-24 2022-12-09 傲拓科技股份有限公司 Scheduling execution method of PLCopen single-axis motion control function block

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001275397A (en) * 2000-03-27 2001-10-05 Yazaki Corp Stepper motor drive control circuit
CN103454979A (en) * 2013-09-11 2013-12-18 大连理工计算机控制工程有限公司 Quick variable-speed curve circular interpolation method packaged into PLCopen instruction
CN103941650A (en) * 2014-04-18 2014-07-23 华南理工大学 Logic and movement integrated controller
CN109313687A (en) * 2016-01-24 2019-02-05 赛义德·卡姆兰·哈桑 AI-based computer security
US20170279702A1 (en) * 2016-03-25 2017-09-28 Dropbox, Inc. System and method for automated issue remediation for information technology infrastructure
CN108582082A (en) * 2018-07-04 2018-09-28 北京镁伽机器人科技有限公司 Robot, back to zero position method, system with accurate back to zero bit function and medium
CN109062145A (en) * 2018-08-13 2018-12-21 大古智能科技(上海)有限公司 Numerically-controlled machine tool motion control card based on WIFI communication
CN114296393A (en) * 2021-12-29 2022-04-08 北京半导体专用设备研究所(中国电子科技集团公司第四十五研究所) Zero-returning method and device for motion platform, electronic equipment and storage medium
CN114995536A (en) * 2022-08-08 2022-09-02 广东科伺智能科技有限公司 Motion controller for servo motor
CN115453967A (en) * 2022-10-24 2022-12-09 傲拓科技股份有限公司 Scheduling execution method of PLCopen single-axis motion control function block

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王夫康;张得礼;周伟;: "PLCopen轴组运动功能块的研究与实现", 机电工程, no. 12 *

Also Published As

Publication number Publication date
CN115987176B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
US10981274B2 (en) Automatic trajectory generation for controlling a drive system
JP6868574B2 (en) A programmable robot equipped with a method for end users to program industrial robots and software for their execution.
CN103403630B (en) Arithmetic element, output control method and program
CN108748138A (en) Speed planning method, system, control system, robot and storage medium
CN111993411A (en) Robot motion planning method and device, robot and storage medium
EP1546870A2 (en) A wizard for programming an intelligent module
KR20100083169A (en) Industrial robot and method for controlling the movement of an industrial robot
US8155781B2 (en) Automation system and method for movement control of at least one moveable machine element
US4059746A (en) Pulse distribution apparatus for linear interpolation in a numerical control system
CN103454979B (en) Quick variable-speed curve circular interpolation method packaged into PLCopen instruction
CN115987176B (en) Method and device for carrying out zero return control on motor position and edge controller
CN112272808A (en) Control device and control method
CN110968045B (en) Speed control method and device for moving target and readable storage medium
CN109474215B (en) Motor inching control method and multi-mode motor control method
CN111562766B (en) Cross slide performance simulation control method, system, storage medium, computer
CN112207824B (en) Method, system, device and storage medium for controlling multiple single-axis modules
CN118282262B (en) Control method and control system of stepping motor, electronic equipment and storage medium
CN115268371B (en) Data processing method, device, electronic device and storage medium
KR20150074392A (en) Method for setting control period of the positioning system
JPS6232508A (en) Positioning control method for servo-system of numerical controller
CN109976256B (en) Control method and control module for laser welding analog quantity
CN118348906A (en) OpenPLC-based uniaxial motion control method
Li The design and application of motion control system based on PLCopen standard
CN104570914A (en) Stacker servo positioning system
CN119839109A (en) Bending machine and rear material blocking maximum speed self-learning method and device thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant