Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for controlling an ink box slot of a nail art machine, which can fix the ink box slot without adding hardware and mechanism parts in the nail art machine and improve the effect of use experience.
In a first aspect, an embodiment of the present invention provides a method for controlling a nail art ink box slot, including:
acquiring the current position coordinate of the ink box groove;
acquiring a corresponding target speed in a preset position speed curve according to the current position coordinate;
and adjusting the speed of the ink box groove according to the instruction corresponding to the target speed.
Optionally, the preset position-speed curve divides the movement range of the ink tank into four regions according to the relative difference between the position coordinate of the ink tank and the target position coordinate;
if the relative difference is smaller than or equal to a first threshold value, the ink box groove is in a first area;
if the relative difference value is larger than a first threshold value and smaller than 0, the ink box groove is positioned in a second area;
if the relative difference value is larger than 0 and smaller than a second threshold value, the ink box groove is in a third area;
and if the relative difference is larger than a second threshold value, the ink box groove is positioned in a fourth area.
Optionally, the target speed includes a target speed value and a target speed direction; the obtaining of the corresponding target speed in a preset position speed curve according to the current position coordinate includes:
judging a region corresponding to the current position coordinate;
if the ink box slot is located in the first area or the fourth area, the obtained target speed values are all first preset values, and the obtained target speed directions are opposite;
if the ink box slot is located at the target position coordinate, the obtained target speed is 0;
and if the ink box slot is positioned in the second area or the third area, the obtained target speed is linearly related to the relative difference value.
Optionally, the target speed value is less than or equal to a first preset value.
Optionally, the ink box slot is fixed on a transmission belt, the transmission belt is connected with a rotating shaft of a motor, and the speed of the ink box slot is adjusted according to the instruction corresponding to the target speed, including:
and adjusting the rotating speed of a motor connected with the ink box groove according to the instruction corresponding to the target speed.
Optionally, the target speed includes a target speed value and a target speed direction, and the rotation speed of the motor includes a rotation speed value of the rotating shaft and a rotation direction of the rotating shaft; the adjusting the rotating speed of the motor connected with the ink box groove according to the instruction corresponding to the target speed comprises the following steps:
acquiring a corresponding instruction according to the target speed;
adjusting the rotating speed value and the rotating direction of the rotating shaft of the motor according to the instruction;
the transmission belt drives the ink box groove to move according to a target speed value and a target speed direction according to a rotating shaft rotating speed value and a rotating shaft rotating direction of the motor.
Optionally, the acquiring the current position coordinates of the ink tank includes:
and acquiring the current position coordinate of the ink box groove through a grating counter, wherein the density of the lines of the grating counter is a second preset value.
In a second aspect, an embodiment of the present invention further provides a nail art ink box control device, including:
the position acquisition module is used for acquiring the current position coordinates of the ink box groove;
the target speed acquisition module is used for acquiring a corresponding target speed in a preset position speed curve according to the current position coordinates;
and the speed adjusting module is used for adjusting the speed of the ink box groove according to the instruction corresponding to the target speed.
In a third aspect, an embodiment of the present invention further provides a nail art ink cartridge slot control apparatus, where the nail art ink cartridge slot control apparatus includes:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the manicure ink fountain control method as described in any one of the first aspects.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the nail art ink tank control method according to any one of the first aspect.
According to the invention, the current position coordinate of the ink box slot is obtained, the corresponding target speed is obtained in the preset position speed curve according to the current position coordinate, and the rotating speed of the motor connected with the ink box slot is adjusted, so that the speed of the ink box slot is adjusted, the problem that the ink box slot moves left and right when the nail art is replaced is solved, the ink box slot can be fixed without adding hardware and mechanism parts in the nail art, and the use experience effect is improved.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flow chart of a method for controlling an ink tank of a nail art machine according to an embodiment of the present invention, where the embodiment is applicable to a case where the ink tank is controlled when an ink cartridge of the nail art machine is replaced, and the method may be implemented by controlling the ink tank of the nail art machine, and specifically includes the following steps:
step 110, the current position coordinates of the ink cartridge slot are obtained.
Wherein the current position coordinates of the ink tank are obtained by a raster counter.
The precision of the grating counter is related to that of the nail art machine, and the density of the lines of the grating counter is a second preset value. Illustratively, the fringe density of the grating counter may be 150, 300, 600, 1200, and 2400 fringes/inch, with a preferred fringe density of 1200 fringes/inch for the grating counter in this embodiment.
And step 120, acquiring a corresponding target speed in a preset position speed curve according to the current position coordinates.
The preset position-velocity profile divides the moving range of the ink tank into four regions, and the four regions have different position-velocity correspondences. The length of the movable range of the ink box groove is 2 inches, for example, the movable area of the ink box groove is divided into 70 equal parts, the position coordinates are marked by taking the leftmost side of the movable area of the ink box groove as an origin (marked as 1), the 35 th equal part is taken as a target position, namely, the position 1 inch away from the leftmost side of the movable area of the ink box groove is taken as a target position, and the ink box groove moves towards the right direction to be taken as a forward movement.
As shown in fig. 2, the preset position-speed curve divides the moving range of the ink cartridge slot into four regions according to the relative difference between the position coordinate of the ink cartridge slot and the target position coordinate, and specifically includes: the first threshold value is-5, and the second threshold value is 5; if the relative difference is less than or equal to the first threshold, the ink box groove is judged to be in the first area S1, and the position coordinate corresponding to the first area S1 is 1-30; if the relative difference is greater than the first threshold and less than 0, then the ink box groove is judged to be in the second area S2, and the position coordinate corresponding to the second area S2 is 31-35; if the relative difference is larger than 0 and smaller than the second threshold, the ink box groove is judged to be in a third area S3, and the position coordinate corresponding to the third area S3 is 35-40; if the relative difference is greater than the second threshold, the ink cartridge slot is determined to be in the fourth area S4, and the position coordinate corresponding to the fourth area S4 is 40-70.
Further, the target speed includes a target speed value and a target speed direction. As shown in fig. 3, step 120 specifically includes:
and step 121, judging the area corresponding to the current position coordinate.
According to the current position coordinates and the area division method, the area where the current ink box slot is located can be quickly located.
And step 122, if the ink box slot is located in the first area or the fourth area, the acquired target speed values are all the first preset values, and the acquired target speed directions are opposite.
If the first area and the fourth area are far away from the target position, the ink box groove needs to be controlled to return to the target position at a high speed, the first preset value is 5 inches/second, the first area and the fourth area are respectively positioned at two sides of the target position, and the target speed directions obtained when the ink box groove is positioned in the first area and the fourth area are opposite; illustratively, when the slot is in the first region, the target speed value is acquired at 5 inches/second and the target speed direction is to the right, and when the slot is in the fourth region, the target speed value is acquired at 5 inches/second and the target speed direction is to the left.
And 123, if the ink box slot is located at the target position coordinate, acquiring the target speed to be 0.
When the position coordinates of the ink box groove are just coincident with the target position coordinates, the ink box groove is kept not to move, namely the speed is 0.
If the ink tank is in the second zone or the third zone, the target velocity obtained is linearly related to the relative difference, step 124.
The second area and the third area are closer to the target position, and the speed of the ink box slot needs to be linearly related to the obtained target speed and the relative difference according to the position conversion, and the relation of the target speed and the relative difference can be expressed as follows:
v=kΔx
where v is the target speed in inches per second; Δ x is the relative difference between the coordinates of the ink tank location and the target location coordinates, in inches; for a fixed coefficient, k is-1 in this example.
The second area is arranged on the left side of the target position, and in the second area, the target speed value is gradually reduced along with the reduction of the distance from the ink box groove to the target position, and the target speed direction is towards the right; the third area is on the right side of the target position, and in the third area, the target speed value gradually increases as the distance of the ink tank from the target position increases, and the target speed direction is to the left.
Further, the target speed value is less than or equal to a first preset value.
In the control process of the ink box slot of the nail art machine, the speed is kept to be less than or equal to 5 inches/second, so that the ink box slot is prevented from shaking in the moving process, the ink box slot can stably run, and the use experience of a user is improved.
And step 130, adjusting the speed of the ink box groove according to the instruction corresponding to the target speed.
Wherein, the ink horn groove is fixed on the drive belt, and the drive belt is connected with the pivot of motor, so the speed that adjusts the ink horn groove according to the instruction that the target speed corresponds specifically is: and adjusting the rotating speed of a motor connected with the ink box groove according to the instruction corresponding to the target speed.
Optionally, the target speed includes a target speed value and a target speed direction, and the rotation speed of the motor includes a rotation speed value of the rotation shaft and a rotation direction of the rotation shaft, as shown in fig. 4, step 130 specifically includes:
and step 131, acquiring a corresponding instruction according to the target speed.
And each position coordinate corresponds to a unique target speed, and a corresponding command for controlling the rotating speed of the motor is obtained according to the obtained target speed.
And 132, adjusting the rotating speed value and the rotating direction of the rotating shaft of the motor according to the instruction.
Illustratively, the rotation direction of the rotating shaft of the motor corresponds to the moving direction of the ink box groove, so that the rotation direction of the rotating shaft when the ink box groove is driven to move rightwards is a positive direction, and the rotation direction of the rotating shaft when the ink box groove is driven to move leftwards is a negative direction; the rotating speed value of the rotating shaft of the motor corresponds to the speed value of the ink box slot, the rotating speed value of the rotating shaft of the motor is adjusted according to the instruction to correspond to the target speed value of the ink box slot, and the rotating direction of the rotating shaft of the motor is adjusted to reversely correspond to the target speed value of the ink box slot.
Step 133, the driving belt drives the ink box slot to move according to the target speed value and the target speed direction according to the rotating speed value and the rotating direction of the rotating shaft of the motor.
After the motor rotating shaft is adjusted, the transmission belt connected with the motor rotating shaft moves under the driving of the rotating shaft, so that the ink box groove is driven to move according to the target speed value and the target speed direction.
According to the embodiment of the invention, the current position coordinate of the ink box groove is obtained, the corresponding target speed is obtained in the preset position speed curve according to the current position coordinate, and the rotating speed of the motor connected with the ink box groove is adjusted, so that the speed of the ink box groove is adjusted, the problem that the ink box groove moves left and right when the nail art is replaced by the nail art is solved, the ink box groove can be fixed without adding hardware and mechanism parts in the nail art, and the use experience effect is improved.
Example two
Fig. 5 is a schematic structural view of a nail art ink box slot control device provided in a second embodiment of the present invention, and as shown in fig. 5, the nail art ink box slot control device includes:
a position acquisition module 210 for acquiring current position coordinates of the ink tank.
The current position coordinates of the ink tank are obtained by a raster counter, which is preferred in this embodiment, for example, having a ruled line density of 1200 bars/inch.
And a target speed obtaining module 220, configured to obtain a corresponding target speed in a preset position-speed curve according to the current position coordinate.
The preset position-velocity profile divides the moving range of the ink tank into four regions, and the four regions have different position-velocity correspondences. The length of the movable range of the ink box groove is 2 inches, for example, the movable area of the ink box groove is divided into 70 equal parts, the position coordinates are marked by taking the leftmost side of the movable area of the ink box groove as an origin (marked as 1), the 35 th equal part is taken as a target position, namely, the position 1 inch away from the leftmost side of the movable area of the ink box groove is taken as a target position, and the ink box groove moves towards the right direction to be taken as a forward movement. The position coordinates corresponding to the first area S1 are 1-30, the position coordinates corresponding to the second area S2 are 31-35, the position coordinates corresponding to the third area S3 are 35-40, and the position coordinates corresponding to the fourth area S4 are 40-70.
Illustratively, when the ink tank is located in the first area, the target speed value is acquired to be 5 inches/second, and the target speed direction is rightward; when the ink box slot is positioned in the fourth area, the obtained target speed value is 5 inches/second, and the target speed direction is leftward; when the position coordinates of the ink box groove are just coincided with the target position coordinates, the ink box groove is kept not to move, namely the speed is 0; in the second area, the target speed value is gradually reduced along with the reduction of the distance from the ink box groove to the target position, and the target speed direction is rightward; in the third region, the target speed value gradually increases as the distance of the ink tank from the target position increases, and the target speed direction is leftward.
In the control process of the ink box slot of the nail art machine, the holding speed is less than or equal to 5 inches/second, so that the ink box slot is prevented from shaking in the moving process, the ink box slot stably runs, and the use experience of a user is improved
And a speed adjusting module 230 for adjusting the speed of the ink box slot according to the instruction corresponding to the target speed.
Wherein, the ink horn groove is fixed on the drive belt, and the drive belt is connected with the pivot of motor, so the speed that adjusts the ink horn groove according to the instruction that the target speed corresponds specifically is: and adjusting the rotating speed of a motor connected with the ink box groove according to the instruction corresponding to the target speed. The target speed comprises a target speed value and a target speed direction, and the rotating speed of the motor comprises a rotating shaft rotating speed value and a rotating shaft rotating direction.
The rotating direction of a rotating shaft of the motor corresponds to the moving direction of the ink box groove, the rotating speed value of the rotating shaft of the motor corresponds to the speed value of the ink box groove, the rotating speed value of the rotating shaft of the motor is adjusted according to the instruction to correspond to the target speed value of the ink box groove, and the rotating direction of the rotating shaft of the motor is adjusted to reversely correspond to the target speed value of the ink box groove; the driving belt connected with the motor rotating shaft moves under the driving of the rotating shaft, so that the ink box groove is driven to move according to the target speed value and the target speed direction.
According to the invention, the current position coordinate of the ink box slot is obtained, the corresponding target speed is obtained in the preset position speed curve according to the current position coordinate, and the rotating speed of the motor connected with the ink box slot is adjusted, so that the speed of the ink box slot is adjusted, the problem that the ink box slot moves left and right when the nail art is replaced is solved, the ink box slot can be fixed without adding hardware and mechanism parts in the nail art, and the use experience effect is improved.
The device for controlling the ink box slot of the nail art machine provided by the embodiment of the invention can execute the method for controlling the ink box slot of the nail art machine provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 6 is a schematic structural diagram of a control apparatus for a nail art ink box according to a third embodiment of the present invention, as shown in fig. 6, the apparatus includes a processor 40, a memory 41, an input device 42 and an output device 43; the number of processors 40 in the device may be one or more, and one processor 70 is illustrated in fig. 6; the processor 40, the memory 41, the input device 42 and the output device 43 in the apparatus may be connected by a bus or other means, as exemplified by the bus connection in fig. 6.
The memory 41 serves as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the manicure ink tank control method in the embodiment of the present invention (e.g., the position acquisition module 310, the target speed acquisition module 320, and the speed adjustment module 330 in the manicure ink tank control apparatus). The processor 40 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 41, that is, implements the above-described nail art ink cartridge slot control method.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 43 may include a display device such as a display screen.
Example four
The fourth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing a nail art machine ink box slot control method, including:
acquiring the current position coordinate of the ink box groove;
acquiring a corresponding target speed in a preset position speed curve according to the current position coordinate;
and adjusting the speed of the ink box groove according to the instruction corresponding to the target speed.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also execute the related operations in the control method of the nail art ink box provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the above embodiment of the nail art ink box control device, the included units and modules are only divided according to functional logic, but not limited to the above division, as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention 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 invention has been described in greater detail by 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, and the scope of the present invention is determined by the scope of the appended claims.