CN117008530A - Control method and device of electronic cam, storage medium and electronic equipment - Google Patents

Control method and device of electronic cam, storage medium and electronic equipment Download PDF

Info

Publication number
CN117008530A
CN117008530A CN202311116459.3A CN202311116459A CN117008530A CN 117008530 A CN117008530 A CN 117008530A CN 202311116459 A CN202311116459 A CN 202311116459A CN 117008530 A CN117008530 A CN 117008530A
Authority
CN
China
Prior art keywords
slave
cam
shaft
synchronous
slave axis
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.)
Pending
Application number
CN202311116459.3A
Other languages
Chinese (zh)
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.)
Leadshine Technology Co Ltd
Shenzhen Leadshine Control Technology Co Ltd
Original Assignee
Leadshine Technology Co Ltd
Shenzhen Leadshine Control 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 Leadshine Technology Co Ltd, Shenzhen Leadshine Control Technology Co Ltd filed Critical Leadshine Technology Co Ltd
Priority to CN202311116459.3A priority Critical patent/CN117008530A/en
Publication of CN117008530A publication Critical patent/CN117008530A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/06Programme control other than numerical control, i.e. in sequence controllers or logic controllers using cams, discs, rods, drums or the like

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Numerical Control (AREA)

Abstract

The invention provides a control method and device of an electronic cam, a storage medium and electronic equipment, wherein the control method comprises the following steps: determining a synchronization position based on the spindle cam phase position and the cam table; determining whether synchronization between the master and slave axes is based on the slave axis cam phase position and the synchronization position; when the main shaft and the slave shaft are not synchronous, controlling the slave shaft to move along a first direction and accelerate; when the phase speed of the cam of the slave shaft reaches the synchronous speed, controlling the slave shaft to continuously accelerate to a first preset speed value, or controlling the slave shaft to move along a first direction and decelerate to a second preset speed value; based on the first preset speed value or the second preset speed value, the slave axis cam phase speed is controlled to reach the synchronous speed again, and the slave axis cam phase position reaches the synchronous position. The control method can enable the main shaft and the slave shaft to be in synchronization smoothly, avoid the jump phenomenon of the slave shaft and ensure smooth movement of the electronic cam.

Description

Control method and device of electronic cam, storage medium and electronic equipment
Technical Field
The disclosure relates to the technical field of electronic cam control, and in particular relates to a control method and device of an electronic cam, a storage medium and electronic equipment.
Background
As industrial technology has developed to date, electronic cams have been receiving increasing attention, and have been widely used in many fields due to their advantages in terms of processing accuracy and flexibility as compared with mechanical cams.
In the prior art, an electronic cam function is realized, and the action of a slave axis is controlled by the difference between the position data of the master axis and the current position of the master axis and the difference between the position data of the slave axis and the number of pulses outputted from the slave axis. Some errors may exist in this way due to some errors in the pulse signal, such as transmission delay of the pulse signal, noise, etc. The slave axis is generally controlled by phase in order to control the slave axis more accurately.
However, when the electronic cam controller receives a start command, the phase position of the spindle and the slave axis may be asynchronous, which may cause a jump of the slave axis and further cause a problem of uneven movement.
Disclosure of Invention
An embodiment of the present disclosure is directed to providing a method and an apparatus for controlling an electronic cam, a storage medium, and an electronic device, so as to solve a technical problem in the prior art that an electronic cam does not move smoothly at a start time.
In order to solve the above technical problems, the embodiments of the present disclosure adopt the following technical solutions:
a first aspect of the present invention provides a control method of an electronic cam, including:
determining a synchronization position based on the spindle cam phase position and the cam table;
determining whether synchronization between the master and slave axes is based on the slave axis cam phase position and the synchronization position;
controlling the slave axis to move and accelerate in a first direction when the master axis and the slave axis are not synchronized;
when the phase speed of the cam of the slave shaft reaches the synchronous speed, controlling the slave shaft to continuously accelerate to a first preset speed value, or controlling the slave shaft to move along a first direction and decelerate to a second preset speed value;
and controlling the slave axis cam phase speed to reach the synchronous speed again based on the first preset speed value or the second preset speed value, and controlling the slave axis cam phase position to reach the synchronous position.
Further, when the phase speed of the cam of the slave shaft reaches the synchronous speed, controlling the slave shaft to continuously accelerate to a first preset speed value, or controlling the slave shaft to move along a first direction and decelerate to a second preset speed value, specifically including:
when the phase speed of the slave axis cam reaches the synchronous speed, acquiring the current slave axis cam phase position;
determining a shortest path direction from the slave axis to the synchronization position based on the current slave axis cam phase position and the synchronization position;
controlling the acceleration or deceleration of the slave axis based on the shortest path direction.
Further, the determining a shortest path direction from the slave axis to the synchronization position based on the current slave axis cam phase position and the synchronization position, and the controlling the slave axis to accelerate or decelerate based on the shortest path direction specifically include:
determining a first path for the slave axis to move and accelerate in a first direction until the synchronous speed and the synchronous position are simultaneously reached, and a second path for the slave axis to move and decelerate in the first direction until the synchronous speed and the synchronous position are simultaneously reached, based on the current slave axis cam phase position and the synchronous position;
when the length of the first path is smaller than that of the second path, determining a first direction as the shortest path direction, and controlling the shaft to move along the first direction and accelerate to the first preset speed value;
and when the length of the first path is greater than that of the second path, determining that the reverse direction of the first direction is the shortest path direction, and controlling the shaft to move along the first direction and decelerate to the second preset speed value.
Further, if the first preset speed value is equal to a preset speed threshold, after the controlling the slave axis to accelerate to the first preset speed value, the method further includes: and keeping the phase speed of the slave axis cam at the speed threshold unchanged for a preset time.
Further, before said controlling said movement of said shaft in said first direction and decelerating to a second preset speed value, further comprises:
acquiring the current cam phase position of the slave shaft;
the second preset speed value is determined based on the current slave axis cam phase position and the synchronization position.
Further, the spindle cam phase position is calculated using a spindle absolute phase mode or a spindle relative phase mode, the slave axis cam phase position is calculated using a slave axis absolute phase mode or a slave axis relative phase mode, wherein,
when the principal axis absolute phase mode is adopted: the phase position of the main shaft cam is obtained by performing die taking calculation on the actual position of the main shaft and the period of the main shaft at any moment;
when the spindle relative phase mode is adopted: the starting point of the spindle cam phase position is determined based on the actual spindle position of the electronic cam at the starting moment;
when the slave axis absolute phase mode is adopted: the slave axis cam phase position is determined based on the master axis cam phase position of the electronic cam at the start time and the cam table;
when the slave axis relative phase mode is adopted: the start point of the slave axis cam phase position is determined based on the slave axis actual position of the electronic cam at the start time.
Further, the method further comprises the following steps: when the electronic cam receives a disengagement instruction, the slave shaft is controlled to stop immediately, or the slave shaft is controlled to move along a first direction and decelerate until stopping, or the slave shaft is controlled to keep the slave shaft cam phase speed operation at the current moment.
A second aspect of the present invention provides a control device for an electronic cam, comprising:
a determining module for determining a synchronization position based on a main shaft cam phase position and a cam table, and determining whether the main shaft and the slave shaft are synchronized based on the slave shaft cam phase position and the synchronization position;
the control module is used for controlling the slave shaft to move along a first direction and accelerate when the master shaft and the slave shaft are not synchronous, controlling the slave shaft to continuously accelerate to a first preset speed value when the slave shaft cam phase speed reaches a synchronous speed, or controlling the slave shaft to move along the first direction and decelerate to a second preset speed value, controlling the slave shaft cam phase speed to reach the synchronous speed again based on the first preset speed value or the second preset speed value, and controlling the slave shaft cam phase position to reach the synchronous position.
A third aspect of the present invention provides a storage medium storing a computer program which, when executed by a processor, implements the steps of the control method described above.
A fourth aspect of the present invention provides an electronic device comprising at least a memory, a processor, said memory having stored thereon a computer program, said processor implementing the steps of the control method described above when executing the computer program on said memory.
According to the control method, when the electronic cam is started, the synchronous position determined through the calculation of the main shaft cam phase position and the cam table is compared with the slave shaft cam phase position, so that the verification and the determination of whether the main shaft and the slave shaft are synchronous are realized; when the main shaft and the slave shaft are not synchronous, controlling the slave shaft to move along a first direction and accelerate so that the phase speed of the cam of the slave shaft reaches the synchronous speed; and then can selectively move in a first direction and accelerate to a first preset speed value, or move in the first direction and decelerate to a second preset speed value; then the slave axis is controlled to move along the first direction and reach the synchronous speed again, and the synchronous position is reached, so that the speed and the position of the master axis and the slave axis are completely synchronous.
The control device, the storage medium and the electronic equipment have all the beneficial effects of the control method and are not repeated here.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a schematic diagram of steps of a control method of an electronic cam according to an embodiment of the disclosure;
FIG. 2 is a schematic diagram illustrating steps of a method of controlling an electronic cam according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of the logic of an electronic cam in receiving a command according to an embodiment of the present disclosure;
fig. 4 is a schematic view of a control device of an electronic cam according to an embodiment of the present disclosure.
Detailed Description
Various aspects and features of the disclosure are described herein with reference to the drawings.
It should be understood that various modifications may be made to the embodiments of the application herein. Therefore, the above description should not be taken as limiting, but merely as exemplification of the embodiments. Other modifications within the scope and spirit of this disclosure will occur to persons of ordinary skill in the art.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and, together with a general description of the disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the disclosure.
These and other characteristics of the present disclosure will become apparent from the following description of a preferred form of embodiment, given as a non-limiting example, with reference to the accompanying drawings.
It should also be understood that, although the present disclosure has been described with reference to some specific examples, a person skilled in the art will certainly be able to achieve many other equivalent forms of the present disclosure, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.
The above and other aspects, features and advantages of the present disclosure will become more apparent in light of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present disclosure will be described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely examples of the disclosure, which may be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the disclosure in unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present disclosure in virtually any appropriately detailed structure.
A first aspect of the present disclosure provides a control method of an electronic cam, as shown in fig. 1, including:
s100, determining a synchronous position based on a main shaft cam phase position and a cam table;
s200, determining whether the main shaft and the auxiliary shaft are synchronous or not based on the auxiliary shaft cam phase position and the synchronous position;
s300, when the main shaft and the slave shaft are not synchronous, controlling the slave shaft to move along a first direction and accelerate;
s400, when the phase speed of the cam of the slave shaft reaches the synchronous speed, controlling the slave shaft to continuously accelerate to a first preset speed value, or controlling the slave shaft to move along a first direction and decelerate to a second preset speed value;
s500, controlling the slave axis cam phase speed to reach the synchronous speed again based on the first preset speed value or the second preset speed value, and controlling the slave axis cam phase position to reach the synchronous position.
In step S100, a synchronization position is determined based on the spindle cam phase position and the cam table. The data of the cam table is pre-stored in a corresponding storage unit (typically a flash memory), the cam table data is loaded into the RAM when the electronic cam is started, the spindle cam phase position can be determined by the spindle cycle phase position and the spindle actual position, and the slave axis cam phase position (i.e. the synchronization position) where the slave axis should be in the synchronous state can be determined according to the spindle cam phase position and the cam table, and the calculation of the synchronization speed mentioned later is not repeated herein.
In step S200, it is determined whether or not the master and slave are synchronized based on the slave cam phase position and the synchronization position. The actual position of the slave shaft is directly acquired by the related acquisition unit, so that the cam phase position of the slave shaft can be determined, and since the cam phase position of the slave shaft at the starting moment of the electronic cam is usually deviated from the synchronous position (namely, the master shaft and the slave shaft are not synchronous in practical application), the slave shaft can smoothly reach the synchronous position through the subsequent steps, and the slave shaft can reach the synchronous speed, so that the synchronization of the master shaft and the slave shaft in both position and speed is realized.
Alternatively, a minimum synchronization position threshold and a minimum synchronization speed threshold may be set in consideration of control accuracy requirements, synchronization speed, and synchronization position, and a synchronization state may be considered to be reached when the difference between the slave axis cam phase position and the synchronization position reaches the minimum synchronization position threshold, and the difference between the slave axis cam phase speed and the synchronization speed reaches the minimum synchronization speed threshold.
In step S300, when the master axis and the slave axis are not synchronized, the slave axis is controlled to move in a first direction and accelerate. In this step, the determination of the first direction may be determined based on the direction of movement of the slave axis corresponding to the cam table, which is exemplified herein as the first direction representing the positive direction, the slave axis moving in the positive direction and accelerating in the positive direction (the positive direction being the direction toward which the slave axis cam phase position value increases).
In step S400, when the slave axis cam phase speed reaches the synchronous speed, the slave axis is controlled to continue to accelerate to a first preset speed value, or the slave axis is controlled to move in a first direction and decelerate to a second preset speed value. When the phase speed of the cam from the shaft reaches the synchronous speed, the first speed of the shaft after the electronic cam is started is synchronous, and the position is not synchronous at the moment, and the synchronous position is changed along with the main shaft based on the rule of the cam table, so that the shaft is required to be continuously accelerated to a first preset speed value so as to catch up with the synchronous position, or the shaft is required to be moved along a first direction and decelerated to a second preset speed value so as to wait for the change of the synchronous position and further realize the position synchronization, namely the acceleration catch-up or deceleration waiting (which can be also understood as reverse catch-up) of the shaft is required to be carried out, and the two can be generally selected by a user according to actual requirements.
As shown in fig. 2, step S400 specifically includes:
s401, when the phase speed of the slave axis cam reaches the synchronous speed, acquiring the current phase position of the slave axis cam. The slave axis cam phase position at which the slave axis cam phase speed reaches the synchronization speed is the current slave axis cam phase position corresponding to the time.
S402, determining the shortest path direction from the slave shaft to the synchronous position based on the current slave shaft cam phase position and the synchronous position. From the current slave axis cam phase position and the synchronization position, a path from the current slave axis cam phase position to the synchronization position can be planned, and since the slave axis has two movement directions of positive and negative directions, the shortest path direction is determined for the efficiency of the slave axis synchronization process.
S403, controlling the acceleration or deceleration of the slave axis based on the shortest path direction. After the shortest path direction is selected, the shaft is selected to accelerate or decelerate accordingly.
Step S402 and step S403 include:
s411, determining a first path of the slave axis moving in a first direction and accelerating until the synchronization speed and the synchronization position are simultaneously reached, and a second path of the slave axis moving in the first direction and decelerating until the synchronization speed and the synchronization position are simultaneously reached, based on the current slave axis cam phase position and the synchronization position. In the previous step, the slave axis has reached the synchronization speed, and in step S411, the first path refers to a path in which the slave axis moves in the first direction and accelerates, thereby generating a relative movement with the synchronization position in the first direction until a synchronization state is reached; the second path refers to a path in which the shaft moves in the first direction and decelerates, thereby generating relative movement with the synchronization position in a direction opposite to the first direction, until a synchronization state is achieved.
S412, when the length of the first path is smaller than that of the second path, determining a first direction as the shortest path direction, and controlling the shaft to move along the first direction and accelerate to the first preset speed value; and when the length of the first path is greater than that of the second path, determining that the reverse direction of the first direction is the shortest path direction, and controlling the shaft to move along the first direction and decelerate to the second preset speed value. The direction of the acceleration is changed corresponding to the shortest path direction to control the movement and acceleration of the shaft in the first direction to achieve the synchronous state in the first path, or the movement and deceleration in the first direction to achieve the synchronous state in the second path. Thus, the shortest path direction can be automatically selected, and corresponding slave axis synchronous control can be performed.
In step S400, if the first preset speed value is equal to the preset speed threshold, after the controlling the slave axis to continue to accelerate to the first preset speed value, the method further includes: and keeping the phase speed of the slave axis cam at the speed threshold unchanged for a preset time. The speed threshold is typically determined based on a maximum speed limit of the slave axis, and the first preset speed value is equal to the speed threshold in order to avoid the slave axis cam phase speed exceeding the speed threshold limit after the slave axis cam phase speed reaches the speed threshold, and the slave axis moves at a constant speed for a preset time at the first preset speed value. It is conceivable that the speed threshold is necessarily higher than the second preset speed value, and that too high a speed does not occur when the shaft moves in the first direction and decelerates to the second preset speed value.
In step S400, if the first preset speed value does not reach the speed threshold, the slave axis is controlled to decelerate immediately after the slave axis is controlled to continue to accelerate to the first preset speed value. Since there is no speed threshold limit, the acceleration and speed of the slave axis can be adjusted as quickly as possible to achieve synchronization more quickly, and the slave axis cam phase speed can be decelerated immediately after reaching the first preset speed value.
In step S400, before controlling the slave axis to move in the first direction and decelerate to the second preset speed value, the method includes: and acquiring a current slave axis cam phase position, and determining the second preset speed value based on the current slave axis cam phase position and the synchronous position. When the slave axis cam phase velocity reaches the synchronization velocity, the current slave axis cam phase position is acquired, and since the deceleration motion is performed next, a second preset velocity value to be reached can be calculated according to the current slave axis cam phase position and the synchronization position, so that the slave axis can wait for deceleration and finally complete synchronization can be realized.
In step S500, the slave axis cam phase speed is controlled to reach the synchronization speed again based on the first preset speed value or the second preset speed value, and the slave axis cam phase position reaches the synchronization position. It is conceivable that the first preset speed is greater than the synchronization speed, which is greater than the second preset speed. When the slave axis moves in the first direction and accelerates to a first preset speed value, planning the slave axis to reach the synchronous speed again and reach the synchronous position simultaneously according to the first preset speed and the distance between the current slave axis cam phase position and the synchronous position, namely, continuing to move to the synchronous position along the first direction and decelerating to the synchronous speed simultaneously; when the slave axis moves in the first direction and decelerates to a second preset speed value, the slave axis is planned to reach the synchronous speed again and reach the synchronous position simultaneously according to the second preset speed and the distance between the current slave axis cam phase position and the synchronous position, namely, the slave axis continues to move to the synchronous position along the first direction and simultaneously accelerates to the synchronous speed.
Preferably, the spindle cam phase position is calculated using a spindle absolute phase mode or a spindle relative phase mode, and the slave axis cam phase position is calculated using a slave axis absolute phase mode or a slave axis relative phase mode, wherein,
when the principal axis absolute phase mode is adopted: the main shaft cam phase position is obtained by performing modular calculation on the main shaft actual position and the main shaft period at any moment (when the calculation result is not in the range of the main shaft cam phase position, the main shaft cam phase position is translated into a corresponding range according to the whole period);
when the spindle relative phase mode is adopted: the starting point of the spindle cam phase position is determined based on the actual spindle position of the electronic cam at the start time (i.e., the spindle cam phase position thereafter is determined in accordance with this correspondence);
when the slave axis absolute phase mode is adopted: the slave axis cam phase position is determined based on the master axis cam phase position of the electronic cam at the start time and the cam table (when the calculation result is not within the range of the slave axis cam phase position, it is sufficient to translate into the corresponding range in full cycle);
when the slave axis relative phase mode is adopted: the start point of the slave axis cam phase position is determined based on the slave axis actual position of the electronic cam at the start timing (i.e., the slave axis cam phase position thereafter is determined in accordance with this correspondence).
The user may use the above-described master absolute phase mode or master relative phase mode for the calculation of the master cam phase position, and use the above-described slave absolute phase mode and slave relative phase mode for the calculation of the slave cam phase position (there is no need to correspond between the respective calculation modes of the master cam phase position and the slave cam phase position, and they may be independently selected, for example, the calculation of the master cam phase position uses the master absolute phase mode and the calculation of the slave cam phase position uses the slave relative phase mode).
In addition, as shown in fig. 3, the electronic cam may receive the disengagement command in either a state of catching up by the control method described above (i.e., a catching-up state) or a state of synchronous movement of the main shaft and the slave shaft.
Preferably, when the electronic cam receives the disengagement command, the slave shaft is controlled to stop immediately (the disengagement is usually applied to an emergency), or the slave shaft is controlled to move along a first direction and decelerate until stopping, namely, a deceleration stop state (the disengagement is usually applied to a non-emergency), or the slave shaft is controlled to keep the slave shaft cam phase speed running at the current moment, namely, a constant speed keeping state (the disengagement is usually applied to a situation that needs to be disengaged and keeps moving), and then the slave shaft can pass through a single shaft stop command again, so that the slave shaft moves from constant speed to final stop and enters the single shaft stop state. In addition, it should be understood that the three shaft control modes described above may be adjusted and selected based on the user's requirements or actual conditions when the disengagement command is received.
According to the control method of the electronic cam, when the electronic cam is started, the synchronous position determined through the calculation of the phase position of the main shaft cam and the cam table is compared with the phase position of the slave shaft cam, so that the verification and the determination of whether the main shaft and the slave shaft are synchronous are realized; when the main shaft and the slave shaft are not synchronous, controlling the slave shaft to move along a first direction and accelerate so that the phase speed of the cam of the slave shaft reaches the synchronous speed; and then can selectively move in a first direction and accelerate to a first preset speed value, or move in the first direction and decelerate to a second preset speed value; then the slave axis is controlled to move along the first direction and reach the synchronous speed again, and the synchronous position is reached, so that the speed and the position of the master axis and the slave axis are completely synchronous.
A second aspect of the present disclosure provides a control device for an electronic cam, including:
a determining module for determining a synchronization position based on a main shaft cam phase position and a cam table, and determining whether the main shaft and the slave shaft are synchronized based on the slave shaft cam phase position and the synchronization position;
the control module is used for controlling the slave shaft to move along a first direction and accelerate when the master shaft and the slave shaft are not synchronous, controlling the slave shaft to continuously accelerate to a first preset speed value when the slave shaft cam phase speed reaches a synchronous speed, or controlling the slave shaft to move along the first direction and decelerate to a second preset speed value, controlling the slave shaft cam phase speed to reach the synchronous speed again based on the first preset speed value or the second preset speed value, and controlling the slave shaft cam phase position to reach the synchronous position.
Further, the determining module may specifically include a spindle position counting unit, a slave axis position counting unit, a spindle position collecting unit, and the like; the control module may specifically include an electronic cam control unit, an slave axis position calculation unit, and the like. The units can be packaged into a static library by adopting a modularized design, can be quickly transplanted in different MCUs and systems, and the control device can call each unit in the static library through an interface to calculate the output position of the slave axis, wherein the output position data of the slave axis can be written into a memory sharing unit of the CPLD, and the internal calculation unit of the CPLD converts pulse data to control the pulse servo motor; the position data output from the shaft can also be connected into a bus module to control the bus type servo motor.
The control device may be composed of a CPLD controller and an MCU controller, and as shown in fig. 4, the CPLD controller is provided with a main shaft position counting unit and an auxiliary shaft position counting unit, for respectively recording pulse positions of the main shaft and the auxiliary shaft, and for respectively outputting pulse signals of the main shaft and the auxiliary shaft, and the memory sharing unit of the CPLD controller is used for exchanging data of the main shaft position and the auxiliary shaft position with the MCU controller; the MCU controller is provided with a main shaft position acquisition unit, an electronic cam control unit, a slave shaft position calculation unit and a cam table storage unit.
When the electronic cam is started, the control device can calculate and determine the synchronous position through the phase position of the main shaft cam and the cam table, and the synchronous position is compared with the phase position of the slave shaft cam, so that the verification and the determination of whether the main shaft and the slave shaft are synchronous are realized; when the main shaft and the slave shaft are not synchronous, controlling the slave shaft to move along a first direction and accelerate so that the phase speed of the cam of the slave shaft reaches the synchronous speed; and then can selectively move in a first direction and accelerate to a first preset speed value, or move in the first direction and decelerate to a second preset speed value; then the slave axis is controlled to move along the first direction and reach the synchronous speed again, and the synchronous position is reached, so that the speed and the position of the master axis and the slave axis are completely synchronous.
A third aspect of the present invention provides a storage medium storing a computer program which, when executed by a processor, implements the steps of the control method described above, comprising:
s100, determining a synchronous position based on a main shaft cam phase position and a cam table;
s200, determining whether the main shaft and the auxiliary shaft are synchronous or not based on the auxiliary shaft cam phase position and the synchronous position;
s300, when the main shaft and the slave shaft are not synchronous, controlling the slave shaft to move along a first direction and accelerate;
s400, when the phase speed of the cam of the slave shaft reaches the synchronous speed, controlling the slave shaft to continuously accelerate to a first preset speed value, or controlling the slave shaft to move along a first direction and decelerate to a second preset speed value;
s500, controlling the slave axis cam phase speed to reach the synchronous speed again based on the first preset speed value or the second preset speed value, and controlling the slave axis cam phase position to reach the synchronous position.
Further, the computer program, when executed by a processor, implements the other control method provided by the first aspect of the present invention.
The computer program in the storage medium of the invention calculates the determined synchronous position through the cam phase position of the main shaft and the cam table, and compared with the cam phase position of the slave shaft, the computer program realizes the check and the determination of whether the main shaft and the slave shaft are synchronous; when the main shaft and the slave shaft are not synchronous, controlling the slave shaft to move along a first direction and accelerate so that the phase speed of the cam of the slave shaft reaches the synchronous speed; and then can selectively move in a first direction and accelerate to a first preset speed value, or move in the first direction and decelerate to a second preset speed value; then the slave axis is controlled to move along the first direction and reach the synchronous speed again, and the synchronous position is reached, so that the speed and the position of the master axis and the slave axis are completely synchronous.
A fourth aspect of the present invention provides an electronic device comprising at least a memory, a processor, said memory having stored thereon a computer program, said processor implementing the steps of the control method described above when executing the computer program on said memory. Illustratively, the steps of the control method include:
s100, determining a synchronous position based on a main shaft cam phase position and a cam table;
s200, determining whether the main shaft and the auxiliary shaft are synchronous or not based on the auxiliary shaft cam phase position and the synchronous position;
s300, when the main shaft and the slave shaft are not synchronous, controlling the slave shaft to move along a first direction and accelerate;
s400, when the phase speed of the cam of the slave shaft reaches the synchronous speed, controlling the slave shaft to continuously accelerate to a first preset speed value, or controlling the slave shaft to move along a first direction and decelerate to a second preset speed value;
s500, controlling the slave axis cam phase speed to reach the synchronous speed again based on the first preset speed value or the second preset speed value, and controlling the slave axis cam phase position to reach the synchronous position.
Further, the computer program, when executed by a processor, implements the other control method provided by the first aspect of the present invention.
The memory of the electronic equipment stores a computer program, which can realize the synchronous position calculated and determined by the cam phase position of the main shaft and the cam table, and compared with the cam phase position of the slave shaft, the synchronous position of the main shaft and the slave shaft can be checked and determined; when the main shaft and the slave shaft are not synchronous, controlling the slave shaft to move along a first direction and accelerate so that the phase speed of the cam of the slave shaft reaches the synchronous speed; and then can selectively move in a first direction and accelerate to a first preset speed value, or move in the first direction and decelerate to a second preset speed value; then the slave axis is controlled to move along the first direction and reach the synchronous speed again, and the synchronous position is reached, so that the speed and the position of the master axis and the slave axis are completely synchronous.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present invention.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (10)

1. A control method of an electronic cam, characterized by comprising:
determining a synchronization position based on the spindle cam phase position and the cam table;
determining whether synchronization between the master and slave axes is based on the slave axis cam phase position and the synchronization position;
controlling the slave axis to move and accelerate in a first direction when the master axis and the slave axis are not synchronized;
when the phase speed of the cam of the slave shaft reaches the synchronous speed, controlling the slave shaft to continuously accelerate to a first preset speed value, or controlling the slave shaft to move along a first direction and decelerate to a second preset speed value;
and controlling the slave axis cam phase speed to reach the synchronous speed again based on the first preset speed value or the second preset speed value, and controlling the slave axis cam phase position to reach the synchronous position.
2. A control method according to claim 1, wherein when the slave axis cam phase speed reaches the synchronous speed, the slave axis is controlled to continue to accelerate to a first preset speed value, or the slave axis is controlled to move in a first direction and decelerate to a second preset speed value, specifically comprising:
when the phase speed of the slave axis cam reaches the synchronous speed, acquiring the current slave axis cam phase position;
determining a shortest path direction from the slave axis to the synchronization position based on the current slave axis cam phase position and the synchronization position;
controlling the acceleration or deceleration of the slave axis based on the shortest path direction.
3. A control method according to claim 2, wherein said determining a shortest path direction from said slave axis to said synchronization position based on said current slave axis cam phase position and said synchronization position, and said controlling said slave axis acceleration or deceleration based on said shortest path direction, specifically comprises:
determining a first path for the slave axis to move and accelerate in a first direction until the synchronous speed and the synchronous position are simultaneously reached, and a second path for the slave axis to move and decelerate in the first direction until the synchronous speed and the synchronous position are simultaneously reached, based on the current slave axis cam phase position and the synchronous position;
when the length of the first path is smaller than that of the second path, determining a first direction as the shortest path direction, and controlling the shaft to move along the first direction and accelerate to the first preset speed value;
and when the length of the first path is greater than that of the second path, determining that the reverse direction of the first direction is the shortest path direction, and controlling the shaft to move along the first direction and decelerate to the second preset speed value.
4. The control method according to claim 1, characterized in that, if the first preset speed value is equal to a preset speed threshold value, after the control of the continuous acceleration of the slave axis to the first preset speed value, further comprising: and keeping the phase speed of the slave axis cam at the speed threshold unchanged for a preset time.
5. A control method according to claim 1, characterized in that before said controlling said movement of said shaft in a first direction and decelerating to a second preset speed value, it further comprises:
acquiring the current cam phase position of the slave shaft;
the second preset speed value is determined based on the current slave axis cam phase position and the synchronization position.
6. The control method according to claim 1, wherein the spindle cam phase position is calculated using a spindle absolute phase mode or a spindle relative phase mode, and the slave axis cam phase position is calculated using a slave axis absolute phase mode or a slave axis relative phase mode, wherein,
when the principal axis absolute phase mode is adopted: the phase position of the main shaft cam is obtained by performing die taking calculation on the actual position of the main shaft and the period of the main shaft at any moment;
when the spindle relative phase mode is adopted: the starting point of the spindle cam phase position is determined based on the actual spindle position of the electronic cam at the starting moment;
when the slave axis absolute phase mode is adopted: the slave axis cam phase position is determined based on the master axis cam phase position of the electronic cam at the start time and the cam table;
when the slave axis relative phase mode is adopted: the start point of the slave axis cam phase position is determined based on the slave axis actual position of the electronic cam at the start time.
7. The control method according to claim 1, characterized by further comprising: when the electronic cam receives a disengagement instruction, the slave shaft is controlled to stop immediately, or the slave shaft is controlled to move along a first direction and decelerate until stopping, or the slave shaft is controlled to keep the slave shaft cam phase speed operation at the current moment.
8. A control device for an electronic cam, comprising:
a determining module for determining a synchronization position based on a main shaft cam phase position and a cam table, and determining whether the main shaft and the slave shaft are synchronized based on the slave shaft cam phase position and the synchronization position;
the control module is used for controlling the slave shaft to move along a first direction and accelerate when the master shaft and the slave shaft are not synchronous, controlling the slave shaft to continuously accelerate to a first preset speed value when the slave shaft cam phase speed reaches a synchronous speed, or controlling the slave shaft to move along the first direction and decelerate to a second preset speed value, controlling the slave shaft cam phase speed to reach the synchronous speed again based on the first preset speed value or the second preset speed value, and controlling the slave shaft cam phase position to reach the synchronous position.
9. A storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the control method according to any one of claims 1-7.
10. An electronic device comprising at least a memory, a processor, the memory having stored thereon a computer program, characterized in that the processor, when executing the computer program on the memory, implements the steps of the control method according to any of claims 1-7.
CN202311116459.3A 2023-08-31 2023-08-31 Control method and device of electronic cam, storage medium and electronic equipment Pending CN117008530A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311116459.3A CN117008530A (en) 2023-08-31 2023-08-31 Control method and device of electronic cam, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311116459.3A CN117008530A (en) 2023-08-31 2023-08-31 Control method and device of electronic cam, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117008530A true CN117008530A (en) 2023-11-07

Family

ID=88572842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311116459.3A Pending CN117008530A (en) 2023-08-31 2023-08-31 Control method and device of electronic cam, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117008530A (en)

Similar Documents

Publication Publication Date Title
EP3196719B1 (en) Multi-mover linear motor controller providing shared coodination subsystem
CN109466554A (en) Adaptive cruise is jumped a queue prevention and control method, system, device and storage medium
JP2006068857A (en) Inter-robot interference preventive control device
US4815007A (en) Apparatus for controlling a robot
CN117008530A (en) Control method and device of electronic cam, storage medium and electronic equipment
JPS58197168A (en) Controller for elevator
JPS58172709A (en) Automatic variable speed controller
US4968923A (en) Servo control system
CN114394113B (en) Vehicle track re-planning method and device, electronic equipment and storage medium
JPS6123211A (en) Resetting system to original point
CN111628682B (en) Stepping motor synchronous driving method, stepping motor synchronous driving device, terminal and storage medium
CN115291534B (en) Intelligent furniture cooperative motion control method and system and computer terminal
CN116578126A (en) Method, device, equipment and storage medium for synchronizing positions of electronic gears
CN115987176B (en) Method and device for carrying out zero return control on motor position and edge controller
JPH04257009A (en) Motor speed control method
CN115001325B (en) Timed interrupt control method and multi-step motor synchronous control system and method
JP2501967B2 (en) Synchronous operation method for mobile devices
JPH064135A (en) Positioning device
JPH02137006A (en) Speed controller
JPS63182715A (en) Positioning control device
JPH02101979A (en) Positioning method for servo system
JPS62230582A (en) Safety device for elevator
JPH08137537A (en) Control command generation device
JPS5983210A (en) Speed control system
CN116980575A (en) Stepping motor control method, stepping motor control device, electronic equipment and storage medium

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