Control method and device for medicine dispensing device

By setting up multiple medicine basket temporary storage positions and target medicine basket storage positions in the automated pharmacy, and using the robot to efficiently move the medicine basket between the medicine library and the medicine taking device, the problem of low efficiency caused by the idle state of the robot is solved, and the efficiency is improved. Medication efficiency.

CN115533957BActive Publication Date: 2024-10-11ZHEJIANG IRON TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211259861.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-14
Publication Date
2024-10-11
Estimated Expiration
2042-10-14

AI Technical Summary

Technical Problem

In an automated pharmacy, it takes a short time for the robot to complete the task of taking medicine, but it takes a long time to get the medicine basket from the medicine library to the medicine taking device, resulting in the robot being idle and reducing the efficiency of taking medicine.

Method used

A control method for the medicine retrieval device is designed. By setting multiple medicine basket temporary storage locations and target medicine basket storage locations between the medicine library and the medicine retrieval device, a manipulator is used to obtain the medicine basket from the medicine library and store the medicine basket in the target medicine basket. The medicine basket is moved between the basket storage position and the medicine basket temporary storage position to ensure that the robot is always busy and improve the efficiency of taking medicine.

Benefits of technology

By optimizing the moving path and storage location of the medicine basket, the possibility of the robot being idle is significantly reduced, the efficiency of medicine retrieval is improved, and the rapid acquisition and processing of medicines are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115533957B_ABST
    Figure CN115533957B_ABST
Patent Text Reader

Abstract

The present invention discloses a control method and device for a medicine taking device, the control method comprising: when a target medicine basket storage position does not store a medicine basket, and a medicine basket is stored in N medicine basket temporary storage positions, the medicine basket is moved from the first medicine basket temporary storage position to the target medicine basket storage position, and the return medicine basket temporary storage position is the first medicine basket temporary storage position; when a medicine basket is stored in the target medicine basket storage position, the manipulator is controlled to take medicine from the medicine basket in the target medicine basket storage position, and when the medicine taking is completed, the medicine basket in the target medicine basket storage position is moved to the return medicine basket temporary storage position; when the return medicine basket temporary storage position is not the second medicine basket temporary storage position, and no medicine basket is stored in the second medicine basket temporary storage position, a medicine basket is received from a medicine storehouse and stored in the second medicine basket temporary storage position; wherein the second medicine basket temporary storage position is one of the M medicine basket temporary storage positions. The control method can greatly reduce the possibility of the manipulator being in an idle state, and improve the efficiency of taking medicine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medicine storage, and in particular to a control method and a device for a medicine taking device. Background Art

[0002] In hospitals, there is usually an automated pharmacy, which usually has several medicine warehouses. In order to facilitate automated driving, medicine baskets are usually stored in the medicine warehouses, which are used to store medicines (for example, boxed medicines, injections, infusion bags, etc.); at the same time, there is also a medicine dispensing device, which is provided with a robot. When a medicine dispensing prescription is received (the medicine dispensing prescription contains several medicine types and the corresponding quantity to be taken for each medicine type), the medicine dispensing prescription is then divided into several medicine dispensing tasks (each medicine dispensing task contains a medicine type and the corresponding quantity to be taken for the medicine type), and the medicine dispensing task is corresponded to a medicine basket (the medicine type and quantity of the medicines stored in the medicine basket both meet the requirements of the medicine dispensing task). After that, the required several medicine baskets are moved to the medicine dispensing device. It can be understood that when the robot completes all the medicine dispensing tasks, the medicine dispensing prescription is completed.

[0003] In practice, the time it takes for a robot to complete a medicine-picking task is usually relatively short, while the time it takes to get the medicine basket from the medicine warehouse to the medicine-picking device is usually relatively long, which may cause the robot to be idle, reducing the efficiency of medicine-picking. Summary of the invention

[0004] In view of this, the main purpose of the present invention is to provide a control method and device for a medicine dispensing device.

[0005] To achieve the above-mentioned purpose, the technical solution of the present invention is implemented as follows: a control method for a medicine taking device, the medicine taking device comprising: a manipulator, a target medicine basket storage position and M medicine basket temporary storage positions, one end of the medicine basket temporary storage position is connected to the target medicine basket storage position, and the other end is used to connect to the medicine warehouse, the medicine basket can move between the target medicine basket storage position and the medicine basket temporary storage position, and can also move between the medicine basket temporary storage position and the medicine warehouse; the manipulator can grab medicines from the medicine basket of the target medicine basket storage position, wherein M is a natural number, and M≥2; comprising the following steps: when the target medicine basket storage position does not store a medicine basket, and the N medicine basket temporary storage positions store a medicine basket, grab the medicine from the first medicine basket Move the medicine basket from the temporary storage position to the target medicine basket storage position, and the return medicine basket temporary storage position is the first medicine basket temporary storage position; wherein, the first medicine basket temporary storage position is one of the N medicine basket temporary storage positions, N is a natural number, and 1≤N≤M; when a medicine basket is stored in the target medicine basket storage position, control the manipulator to take medicine from the medicine basket in the target medicine basket storage position, and when the medicine taking is completed, move the medicine basket in the target medicine basket storage position to the return medicine basket temporary storage position; when the return medicine basket temporary storage position is not the second medicine basket temporary storage position, and no medicine basket is stored in the second medicine basket temporary storage position, receive a medicine basket from the medicine warehouse and store it in the second medicine basket temporary storage position; wherein, the second medicine basket temporary storage position is one of the M medicine basket temporary storage positions.

[0006] As an improvement of an embodiment of the present invention, the moving of the medicine basket in the target medicine basket storage position to the return medicine basket temporary storage position specifically includes: moving the medicine basket in the target medicine basket storage position to the return medicine basket temporary storage position, and then moving the medicine basket in the return medicine basket temporary storage position to the medicine warehouse, and the return medicine basket temporary storage position is empty.

[0007] As an improvement of an embodiment of the present invention, the moving of the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position specifically includes: arbitrarily selecting the first medicine basket temporary storage position from a plurality of medicine basket temporary storage positions storing medicine baskets, and moving the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position.

[0008] As an improvement of an embodiment of the present invention, the method of moving a medicine basket from a first medicine basket temporary storage position to a target medicine basket storage position specifically includes: obtaining a circular queue Q formed by the M medicine basket temporary storage positions, an index position, and a preset access direction; setting a stop symbol to no, and continuously executing steps based on the preset access direction until the stop symbol is true; the steps specifically include: obtaining a third medicine basket temporary storage position located after the index position in the circular queue Q, and modifying the value of the index position to the third medicine basket temporary storage position; when the third medicine basket temporary storage position stores a medicine basket, the stop symbol is true, and the value of the first medicine basket temporary storage position is the third medicine basket temporary storage position.

[0009] As an improvement of an embodiment of the present invention, the completion of drug taking specifically includes: obtaining the desired number Num of medicine baskets corresponding to the target medicine basket storage position, and when the robot takes Num medicines from the medicine basket in the target medicine basket storage position, the drug taking is completed.

[0010] The embodiment of the present invention further provides a control device for a medicine dispensing device, the medicine dispensing device comprising: a manipulator, a target medicine basket storage position and M medicine basket temporary storage positions, one end of the medicine basket temporary storage position is connected to the target medicine basket storage position, and the other end is used to connect to the medicine store, the medicine basket can move between the target medicine basket storage position and the medicine basket temporary storage position, and can also move between the medicine basket temporary storage position and the medicine store; the manipulator can grab medicines from the medicine basket of the target medicine basket storage position, wherein M is a natural number, and M≥2; and the following modules are included:

[0011] A basket moving module is used to move the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position when the target medicine basket storage position does not store a medicine basket and the N medicine basket temporary storage positions store a medicine basket, and the returned medicine basket temporary storage position is the first medicine basket temporary storage position; wherein the first medicine basket temporary storage position is one of the N medicine basket temporary storage positions, N is a natural number, and 1≤N≤M;

[0012] The medicine taking module is used to control the manipulator to take medicine from the medicine basket in the target medicine basket storage position when a medicine basket is stored in the target medicine basket storage position, and to move the medicine basket in the target medicine basket storage position to the return medicine basket temporary storage position when the medicine taking is completed;

[0013] The basket replenishing module is used to receive a medicine basket from the medicine warehouse and store it in the second medicine basket temporary storage position when the returned medicine basket temporary storage position is not the second medicine basket temporary storage position and no medicine basket is stored in the second medicine basket temporary storage position; wherein the second medicine basket temporary storage position is one of the M medicine basket temporary storage positions.

[0014] As an improvement of an embodiment of the present invention, the medicine taking module is also used to: move the medicine basket in the target medicine basket storage position to the return medicine basket temporary storage position, and then move the medicine basket in the return medicine basket temporary storage position to the medicine warehouse, and the return medicine basket temporary storage position is empty.

[0015] As an improvement of the embodiment of the present invention, the basket moving module is also used to: arbitrarily select a first medicine basket temporary storage position from a plurality of medicine basket temporary storage positions storing medicine baskets, and move the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position.

[0016] As an improvement of an embodiment of the present invention, the basket moving module is also used to: obtain a circular queue Q formed by the M medicine basket temporary storage positions, an index position and a preset access direction; set a stop symbol to no, and continue to execute steps based on the preset access direction until the stop symbol is true; the steps specifically include: obtaining the third medicine basket temporary storage position located after the index position in the circular queue Q, and modifying the value of the index position to the third medicine basket temporary storage position; when the third medicine basket temporary storage position stores a medicine basket, the stop symbol is true, and the value of the first medicine basket temporary storage position is the third medicine basket temporary storage position.

[0017] As an improvement of an embodiment of the present invention, the medicine taking module is also used to: obtain the desired number Num of medicine baskets in the target medicine basket storage position, and when the robot takes Num medicines from the medicine basket in the target medicine basket storage position, the medicine taking is completed.

[0018] The control method and device of the medicine taking device provided by the embodiment of the present invention have the following advantages: The embodiment of the present invention discloses a control method and device of the medicine taking device, the control method comprising: when the target medicine basket storage position does not store a medicine basket, and the N medicine basket temporary storage positions store a medicine basket, move the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position, and the return medicine basket temporary storage position is the first medicine basket temporary storage position; when the target medicine basket storage position stores a medicine basket, control the manipulator to take medicine from the medicine basket in the target medicine basket storage position, and when the medicine taking is completed, move the medicine basket in the target medicine basket storage position to the return medicine basket temporary storage position; when the return medicine basket temporary storage position is not the second medicine basket temporary storage position, and the second medicine basket temporary storage position does not store a medicine basket, a medicine basket is received from the medicine warehouse and stored in the second medicine basket temporary storage position; wherein the second medicine basket temporary storage position is one of the M medicine basket temporary storage positions. The control method can greatly reduce the possibility of the manipulator being in an idle state and improve the efficiency of taking medicine. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a schematic structural diagram of a medicine dispensing device in an embodiment;

[0020] Figure 2 Schematic diagram of the control method in the embodiment;

[0021] Figure 3 Schematic diagram of the control method in the embodiment. DETAILED DESCRIPTION

[0022] The present invention will be described in detail below in conjunction with the embodiments shown in the accompanying drawings. However, the embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on the embodiments are all within the protection scope of the present invention.

[0023] The following description and accompanying drawings fully illustrate the specific embodiments of this article so that those skilled in the art can practice them. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of the embodiments of this article includes the entire scope of the claims, as well as all available equivalents of the claims. Herein, the terms "first", "second", etc. are only used to distinguish one element from another, without requiring or implying any actual relationship or order between these elements. In fact, the first element can also be called the second element, and vice versa. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the structure, device or equipment including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such structure, device or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the structure, device or equipment including the elements. Each embodiment is described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other.

[0024] The terms "longitudinal", "lateral", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. in this document indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing this document and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In the description of this document, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a mechanical connection or an electrical connection, it can also be the internal communication of two elements, it can be a direct connection, or it can be an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0025] Embodiment 1 of the present invention provides a control method for a medicine dispensing device, such as Figure 1As shown, the medicine taking device includes: a manipulator, a target medicine basket storage position 3 and M medicine basket temporary storage positions 2, one end of the medicine basket temporary storage position 2 is connected to the target medicine basket storage position 3, and the other end is used to connect to the medicine storehouse, the medicine basket can move between the target medicine basket storage position 3 and the medicine basket temporary storage position 2, and can also move between the medicine basket temporary storage position 2 and the medicine storehouse; the manipulator can grab medicines from the medicine basket of the target medicine basket storage position 3, wherein M is a natural number, and M≥2; here, optionally, the medicine basket temporary storage position 2 can be a belt, so that by rotating the belt, the medicine basket can be moved between the belt and the target medicine basket storage position 3, and between the medicine storehouse and the target medicine basket storage position 3; in order to increase the speed of taking medicines, the manipulator can include multiple mechanical claws, so that multiple medicines can be grabbed at the same time.

[0026] Here, an execution device may be provided in the medicine dispensing device to run the control method. When a medicine basket is moved to the medicine basket temporary storage position 2, the execution device can receive the medicine dispensing task corresponding to the medicine basket (for example, obtained from the hospital information system).

[0027] Sensors are provided in the target medicine basket storage position 3 and the M medicine basket temporary storage positions 2, which can detect whether a medicine basket is stored thereon. Sensors can also be provided on the manipulator, which can detect whether there are medicines stored in the medicine basket and the position of the stored medicines, so as to guide the manipulator to grab the medicines and complete the medicine removal.

[0028] like Figure 2 As shown, the following steps are included:

[0029] Step 201: When the target medicine basket storage position 3 does not store a medicine basket, and the N medicine basket temporary storage positions 2 store a medicine basket, move the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position 3, and the returned medicine basket temporary storage position is the first medicine basket temporary storage position; wherein the first medicine basket temporary storage position is one of the N medicine basket temporary storage positions 2, N is a natural number, and 1≤N≤M;

[0030] Step 202: when a medicine basket is stored in the target medicine basket storage position 3, the manipulator is controlled to take medicine from the medicine basket in the target medicine basket storage position 3, and when the medicine is taken, the medicine basket in the target medicine basket storage position 3 is moved to the return medicine basket temporary storage position;

[0031] Step 203: When the returned medicine basket temporary storage position is not the second medicine basket temporary storage position, and no medicine basket is stored in the second medicine basket temporary storage position, a medicine basket is received from the medicine warehouse and stored in the second medicine basket temporary storage position; wherein the second medicine basket temporary storage position is one of the M medicine basket temporary storage positions 2.

[0032] Here, when the target medicine basket storage position 3 does not store a medicine basket, it is necessary to obtain a medicine basket from a first medicine basket temporary storage position where a medicine basket is stored, and place the medicine basket in the target medicine basket storage position 3. It can be understood that, after that, the medicine can be taken from the medicine basket located in the target medicine basket storage position 3 and the task can be completed. After the medicine is taken, the medicine basket is returned to the medicine warehouse through the first medicine basket temporary storage position. And in taking medicine, when a medicine basket is not stored in a medicine basket temporary storage position, a medicine basket is received from the medicine warehouse and stored in the medicine basket temporary storage position. It can be understood that this greatly reduces the possibility of the manipulator being idle. In addition, in order not to affect the return of the medicine basket in the target medicine basket storage position 3 to the medicine warehouse, although there is no medicine basket stored in the first medicine basket temporary storage position, the medicine basket cannot be stored in the first medicine basket temporary storage position.

[0033] In this embodiment, the moving of the medicine basket in the target medicine basket storage position 3 to the return medicine basket temporary storage position specifically includes: moving the medicine basket in the target medicine basket storage position 3 to the return medicine basket temporary storage position, and then moving the medicine basket in the return medicine basket temporary storage position to the medicine warehouse, and the return medicine basket temporary storage position is empty. Here, in order not to affect the subsequent storage of the medicine basket in the return medicine basket temporary storage position, the return medicine basket temporary storage position needs to be set to empty.

[0034] In this embodiment, moving the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position 3 specifically includes: arbitrarily selecting the first medicine basket temporary storage position from a plurality of medicine basket temporary storage positions 2 storing medicine baskets, and moving the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position 3.

[0035] In this embodiment, the moving of the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position 3 specifically includes: obtaining the circular queue Q formed by the M medicine basket temporary storage positions 2, the index position and the preset access direction; setting the stop symbol to no, based on the preset access direction, continuously executing the steps until the stop symbol is true; the steps specifically include: obtaining the third medicine basket temporary storage position located after the index position in the circular queue Q, the value of the index position is modified to the third medicine basket temporary storage position, when the third medicine basket temporary storage position stores a medicine basket, the stop symbol is true, and the value of the first medicine basket temporary storage position is the third medicine basket temporary storage position. Here, as Figure 3 As shown, use , ,..., To represent the M medicine basket temporary storage locations 2, and the preset access direction can be --> -->...--> --> -->..., assuming the index position is , then you will get ,if When a medicine basket is stored, the value of the temporary storage position of the first medicine basket is , and the value of the index position is also ; The next time the control method is executed, the index position is It can be understood that this can ensure that each medicine basket in the medicine basket temporary storage position 2 has an equal chance of being moved to the target medicine basket storage position 3 .

[0036] In this embodiment, completing the drug taking specifically includes: obtaining the desired quantity Num corresponding to the medicine basket in the target medicine basket storage position 3, and when the robot takes Num drugs from the medicine basket in the target medicine basket storage position 3, the drug taking is completed.

[0037] Optional, M=2.

[0038] Embodiment 2 of the present invention provides a control device for a medicine dispensing device, the medicine dispensing device comprising: a manipulator, a target medicine basket storage position 3 and M medicine basket temporary storage positions 2, one end of the medicine basket temporary storage position 2 is connected to the target medicine basket storage position 3, and the other end is used to connect to the medicine storehouse, the medicine basket can move between the target medicine basket storage position 3 and the medicine basket temporary storage position 2, and can also move between the medicine basket temporary storage position 2 and the medicine storehouse; the manipulator can grab medicines from the medicine basket of the target medicine basket storage position 3, wherein M is a natural number, and M≥2; comprising the following modules:

[0039] A basket moving module is used to move a medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position 3 when the target medicine basket storage position 3 does not store a medicine basket and the N medicine basket temporary storage positions 2 store a medicine basket, and the returned medicine basket temporary storage position is the first medicine basket temporary storage position; wherein the first medicine basket temporary storage position is one of the N medicine basket temporary storage positions 2, N is a natural number, and 1≤N≤M;

[0040] The medicine taking module is used to control the manipulator to take medicine from the medicine basket in the target medicine basket storage position 3 when a medicine basket is stored in the target medicine basket storage position 3, and to move the medicine basket in the target medicine basket storage position 3 to the temporary storage position of the return medicine basket when the medicine taking is completed;

[0041] The basket replenishing module is used to receive a medicine basket from the medicine warehouse and store it in the second medicine basket temporary storage position when the returned medicine basket temporary storage position is not the second medicine basket temporary storage position and no medicine basket is stored in the second medicine basket temporary storage position; wherein the second medicine basket temporary storage position is one of the M medicine basket temporary storage positions 2.

[0042] In this embodiment, the medicine taking module is also used to: move the medicine basket in the target medicine basket storage position 3 to the return medicine basket temporary storage position, and then move the medicine basket in the return medicine basket temporary storage position to the medicine warehouse, and the return medicine basket temporary storage position is empty.

[0043] In this embodiment, the basket moving module is further used to: arbitrarily select a first medicine basket temporary storage position from a plurality of medicine basket temporary storage positions 2 storing medicine baskets, and move the medicine basket from the first medicine basket temporary storage position to the target medicine basket storage position 3.

[0044] In this embodiment, the basket moving module is also used to: obtain the circular queue Q formed by the M medicine basket temporary storage positions 2, the index position and the preset access direction; set the stop symbol to no, and continue to execute the steps based on the preset access direction until the stop symbol is true; the steps specifically include: obtaining the third medicine basket temporary storage position located after the index position in the circular queue Q, and modifying the value of the index position to the third medicine basket temporary storage position. When the third medicine basket temporary storage position stores a medicine basket, the stop symbol is true, and the value of the first medicine basket temporary storage position is the third medicine basket temporary storage position.

[0045] In this embodiment, the medicine taking module is also used to: obtain the desired quantity Num of medicine baskets in the target medicine basket storage position 3, and when the robot takes Num medicines from the medicine basket in the target medicine basket storage position 3, the medicine taking is completed.

[0046] It should be noted that although the above describes the various steps in a specific order, it does not mean that the various steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently or even in a different order as long as the required functions can be achieved.

[0047] The present invention may be a system, a method and / or a computer program product. The computer program product may include a readable storage medium carrying computer readable program instructions for causing a processor to implement various aspects of the present invention.

[0048] The readable storage medium can be a tangible device that holds and stores instructions used by the instruction execution device. The readable storage medium can include, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof.

[0049] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A control method for a medicine dispensing device, wherein the medicine dispensing device include: A manipulator, a target medicine basket storage position (3) and M medicine basket temporary storage positions (2), wherein one end of the medicine basket temporary storage position (2) is connected to the target medicine basket storage position (3) and the other end is used to connect to a medicine store, and the medicine basket can move between the target medicine basket storage position (3) and the medicine basket temporary storage position (2), and can also move between the medicine basket temporary storage position (2) and the medicine store; the manipulator can grab medicines from the medicine basket of the target medicine basket storage position (3), wherein M is a natural number and M≥2; and it is characterized in that it comprises the following steps: When the target medicine basket storage position (3) does not store a medicine basket, and the N medicine basket temporary storage positions (2) store a medicine basket, obtain a circular queue Q formed by the M medicine basket temporary storage positions (2), an index position, and a preset access direction; set a stop symbol to no, and continue to execute steps based on the preset access direction until the stop symbol is true; the steps specifically include: obtaining a third medicine basket temporary storage position located after the index position in the circular queue Q, modifying the value of the index position to the third medicine basket temporary storage position, and when the third medicine basket temporary storage position stores a medicine basket, the stop symbol is true, and the value of the first medicine basket temporary storage position is the third medicine basket temporary storage position; and the returned medicine basket temporary storage position is the first medicine basket temporary storage position; wherein the first medicine basket temporary storage position is one of the N medicine basket temporary storage positions (2), N is a natural number, and 1≤N≤M; When a medicine basket is stored in the target medicine basket storage position (3), the manipulator is controlled to take medicine from the medicine basket in the target medicine basket storage position (3), and when the medicine taking is completed, the medicine basket in the target medicine basket storage position (3) is moved to the return medicine basket temporary storage position, and then the medicine basket in the return medicine basket temporary storage position is moved to the medicine warehouse, and the return medicine basket temporary storage position is empty; When the returned medicine basket temporary storage position is not the second medicine basket temporary storage position, and no medicine basket is stored in the second medicine basket temporary storage position, a medicine basket is received from the medicine warehouse and stored in the second medicine basket temporary storage position; wherein the second medicine basket temporary storage position is one of the M medicine basket temporary storage positions (2).

2. The control method according to claim 1, It is characterized in that The method of completing the drug taking specifically includes: obtaining the desired number Num of medicine baskets in the target medicine basket storage position (3); and when the robot arm takes away Num medicines from the medicine basket in the target medicine basket storage position (3), the drug taking is completed.

3. A control device for a medicine dispensing device, the medicine dispensing device include: A manipulator, a target medicine basket storage position (3) and M medicine basket temporary storage positions (2), wherein one end of the medicine basket temporary storage position (2) is connected to the target medicine basket storage position (3) and the other end is used to connect to a medicine store, and the medicine basket can move between the target medicine basket storage position (3) and the medicine basket temporary storage position (2), and can also move between the medicine basket temporary storage position (2) and the medicine store; the manipulator can grab medicines from the medicine basket of the target medicine basket storage position (3), wherein M is a natural number, and M≥2; it is characterized in that it includes the following modules: The basket shifting module is used for obtaining the circular queue Q, index position and preset access direction formed by the M medicine basket temporary storage positions (2) when the target medicine basket storage position (3) does not store a medicine basket and the N medicine basket temporary storage positions (2) store a medicine basket; setting the stop symbol to no, and continuously executing the steps based on the preset access direction until the stop symbol is true; the steps specifically include: obtaining the third medicine basket temporary storage position located after the index position in the circular queue Q, modifying the value of the index position to the third medicine basket temporary storage position, when the third medicine basket temporary storage position stores a medicine basket, the stop symbol is true, and the value of the first medicine basket temporary storage position is the third medicine basket temporary storage position; and the returned medicine basket temporary storage position is the first medicine basket temporary storage position; wherein the first medicine basket temporary storage position is one of the N medicine basket temporary storage positions (2), N is a natural number, and 1≤N≤M; The medicine taking module is used for controlling the manipulator to take medicine from the medicine basket in the target medicine basket storage position (3) when a medicine basket is stored in the target medicine basket storage position (3), and when the medicine taking is completed, moving the medicine basket in the target medicine basket storage position (3) to the return medicine basket temporary storage position, and then moving the medicine basket in the return medicine basket temporary storage position to the medicine warehouse, and the return medicine basket temporary storage position is empty; The basket replenishing module is used to receive a medicine basket from the medicine warehouse and store it in the second medicine basket temporary storage position when the returned medicine basket temporary storage position is not the second medicine basket temporary storage position and no medicine basket is stored in the second medicine basket temporary storage position; wherein the second medicine basket temporary storage position is one of the M medicine basket temporary storage positions (2).

4. The control device according to claim 3, It is characterized in that The medicine taking module is also used to obtain the desired number Num of medicine baskets in the target medicine basket storage position (3), and when the robot arm takes Num medicines from the medicine basket in the target medicine basket storage position (3), the medicine taking is completed.