A method for scheduling laboratory electrochemical instruments using signal quantities

Through semaphore scheduling method and independent thread management, the problem of multi-titration units semaphore preemption of the robot is solved, which improves the work efficiency of the robot and the simplicity of the application, reduces development costs and reduces error occurrence.

CN115372639BActive Publication Date: 2025-05-06SHANGHAI YIDIAN SCI INSTR
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211108942.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-13
Publication Date
2025-05-06
Estimated Expiration
2042-09-13

AI Technical Summary

Technical Problem

In the prior art, preemption occurs when several titration units share a robot, resulting in low efficiency of the robot and complex task scheduling is prone to errors.

Method used

By using semaphore scheduling method, independent threads are established and mutually exclusive resources of the robot and titration unit are licensed. The scheduling is completed using the System.Threading.Semaphore class to ensure the effective utilization of the robot.

Benefits of technology

Improves the work efficiency of the robot, enables it to grab and place samples between multiple channels without interference, simplifies the application's code complexity, reduces software development costs, and eliminates errors caused by complex task scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115372639B_ABST
    Figure CN115372639B_ABST
Patent Text Reader

Abstract

The present invention discloses a scheduling method for laboratory electrochemical instruments using semaphores, comprising: S101, sending a request to a corresponding device through a device search component, and allocating an AID; S102, establishing an independent thread with the AID through a thread establishment component, and establishing a license for mutually exclusive resources of a manipulator and a titration unit; S103, each independent thread uses the System.Threading.Semaphore class to complete scheduling; S104, the request thread is occupied through WaitOne, and the Release method is released. According to the present invention, the code complexity of the application is simplified, the software development cost is reduced, and the errors caused by complex task scheduling are eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of chemical instrument devices, and in particular to a scheduling method for scheduling laboratory electrochemical instruments using signal quantities. Background Art

[0002] Semaphore is similar to mutex, but it allows multiple threads to access a shared resource at the same time. There are two common methods of Semaphore in C# class: WaitOne() and Release(). Release() is used to exit the semaphore and return the previous count, while WaitOne() blocks the current thread until the WaitHandle of the current thread receives the signal.

[0003] Usually when using semaphores, a thread that wants to access a shared resource will try to obtain a permit. If the semaphore counter is greater than 0, the thread will obtain a permit and reduce the semaphore counter by 1, otherwise the thread will block until a permit is obtained. When the thread no longer needs the shared resource, it will release the permit owned by the lock and increase the number of permits by 1. If there are other threads waiting for permits, the thread will immediately obtain the permit.

[0004] Usually, multiple threads access a resource at the same time. Synchronous and mutually exclusive access means that only one thread can access the same resource at the same time. To solve the problem of mutual exclusion, it is necessary to use the semaphore method in the operating system. Summary of the invention

[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a scheduling method for scheduling laboratory electrochemical instruments using semaphores, which simplifies the code complexity of the application program, reduces the software development cost, and eliminates errors caused by complex task scheduling. In order to achieve the above-mentioned purpose and other advantages of the present invention, a scheduling method for scheduling laboratory electrochemical instruments using semaphores is provided, comprising:

[0006] A sample base and a sample plate and a manipulator fixing plate plugged into the sample base, and a plurality of titration units are arranged on one side of the sample base;

[0007] A plurality of sample trays are plugged into the sample base, a manipulator is fixed on the manipulator fixing tray, and the manipulator comprises a main body rotating unit, a spindle lifting unit arranged on the main body rotating unit, a forearm rotating unit connected to the spindle lifting unit, and a sample grabbing unit interactively connected to the forearm rotating unit;

[0008] A plurality of connection ports are arranged on one side surface of the main rotating unit. A stepping drive motor is arranged in the main rotating unit. The stepping drive motor is connected to the upper computer through the connection port.

[0009] The scheduling method includes the following steps:

[0010] S101, sending a request to the corresponding device through the device search component to allocate an AID;

[0011] S102, establishing an independent thread for the AID through a thread establishment component, and establishing permissions for mutually exclusive resources of the manipulator and the titration unit;

[0012] S103, each independent thread uses the System.Threading.Semaphore class to complete scheduling;

[0013] S104, the request thread is occupied by WaitOne and released by the Release method

[0014] Preferably, the sample base comprises a plurality of sample base units, and a plurality of positioning recessed holes are formed on the end surface of each sample base unit close to the sample disk.

[0015] Preferably, each sample base unit has two V-shaped positioning grooves on one side, and two V-shaped positioning protrusions are fixedly connected to the other side opposite to the V-shaped positioning grooves. Two adjacent sample base units are connected by plugging through the V-shaped positioning grooves and the V-shaped positioning protrusions.

[0016] Preferably, a plurality of positioning protrusions are provided on one end surface of the sample plate and the manipulator fixing plate close to the sample base, and the positioning protrusions correspond to the positioning recessed holes one by one.

[0017] Preferably, the titration unit comprises a base and a titration piece and a measuring unit snap-connected to the base, a plurality of rectangular guide grooves are provided on the base, and bottom guide rails are fixedly connected to the end faces of the titration piece and the measuring unit close to the base, and the bottom guide rails match the rectangular guide grooves.

[0018] Preferably, a 7-pin socket is provided on the base, a 7-pin pin is provided on one end face of the titration piece and the measuring unit close to the base, and a V-shaped positioning protrusion is fixed on one end face of the base, and the V-shaped positioning protrusion matches the V-shaped positioning groove on the sample base unit.

[0019] Preferably, the number of independent threads established is 3, and the number of permissions for establishing mutually exclusive resources between the manipulator and multiple titration units is 1.

[0020] Preferably, step S104 further includes the following steps:

[0021] 1) Initially, the robot permission is 1;

[0022] 2) The thread decrements the license count by calling the WaitOne method;

[0023] 3) When the count is zero, subsequent requests will be blocked until other threads call the Release method to release the manipulator;

[0024] 4) When all threads release the robot, the count is at the maximum value specified when the robot was created

[0025] Compared with the prior art, the present invention has the following beneficial effects: in view of the situation in the prior art where one manipulator for several titration units is prone to preemption, the present invention improves the working efficiency of the manipulator, enables the manipulator to reach any position of the equipment, and enables multiple channels to grab samples from the sample tray and place them in the titration unit for titration measurement. By installing the manipulator on the sample base, there is no interference with each other, and the samples can be grabbed and placed in the original position.

[0026] It can effectively solve the problem in the prior art that three titration units occupy a set of robot injection units, simplify the code complexity of the application, reduce unnecessary overhead caused by frequent access to equipment, reduce software development costs, eliminate errors caused by complex task scheduling, and fill the gap in signal quantity technology in the electrochemical instrument industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A top view of a method for scheduling a laboratory electrochemical instrument using a signal quantity according to the present invention;

[0028] Figure 2 A top view and a side view of a sample base of a scheduling method for scheduling a laboratory electrochemical instrument using a signal quantity according to the present invention;

[0029] Figure 3 A schematic diagram of a scheduling method for scheduling laboratory electrochemical instruments using signal quantities and a sample tray structure according to the present invention;

[0030] Figure 4 A cross-sectional view of a manipulator according to a method for scheduling laboratory electrochemical instruments using signal quantities according to the present invention;

[0031] Figure 5 A side view of a manipulator of a method for scheduling laboratory electrochemical instruments using signal quantities according to the present invention;

[0032] Figure 6 A schematic diagram of the three-dimensional structure of a titration unit of the method for scheduling a laboratory electrochemical instrument using a signal quantity according to the present invention;

[0033] Figure 7The diagram is a three-dimensional exploded structure diagram of a titration unit according to the method for scheduling a laboratory electrochemical instrument using signal quantity according to the present invention.

[0034] Figure 8 The flowchart is a method for scheduling laboratory electrochemical instruments by using signal quantities according to the present invention. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] Reference Figure 1-8 A method for scheduling laboratory electrochemical instruments using signal quantities, comprising: a sample base and a sample plate 1 and a manipulator fixed plate 2 plugged into the sample base, a plurality of titration units 16 are arranged on one side of the sample base, each titration unit 16 is independently started and not coupled with each other, all devices initially only carry data characterizing their own device type, communicate through a serial port system, the manipulator and the titration unit 16 are controlled by a host computer, and communicate with the device unit through C# software deployed on the computer;

[0037] A plurality of sample trays 1 are plugged into the sample base, and a manipulator is fixed on the manipulator fixed tray 2. The manipulator comprises a main rotating unit 8, a spindle lifting unit 9 arranged on the main rotating unit 8, a forearm rotating unit 10 connected to the spindle lifting unit 9, and a sample grabbing unit 11 interactively connected to the forearm rotating unit 10. The main rotating unit 8, the spindle lifting unit 9, the forearm rotating unit 10 and the sample grabbing unit 11 in the manipulator designed in the present application are all existing mechanical structures, and the specific structure will not be described in detail in the present application.

[0038] The scheduling method includes the following steps:

[0039] S101, sending a request to the corresponding device through the device search component to allocate an AID;

[0040] S102, establishing an independent thread for the AID through a thread establishment component, and establishing permissions for mutually exclusive resources of the manipulator and the titration unit 16;

[0041] S103, each independent thread uses the System.Threading.Semaphore class to complete scheduling;

[0042] S104, the request thread is occupied by WaitOne and released by Release method.

[0043]

[0044] The table above is a comparison of parameters before and after the application of this technology. Through specific data explanation, the code complexity of the application is simplified by 24.3%, unnecessary overhead caused by frequent access to devices is reduced, software development costs are reduced, errors caused by complex task scheduling are eliminated, and the gap in signal quantity technology in the electrochemical instrument industry is filled.

[0045] A plurality of connection ports are arranged on one side of the main rotating unit 8, and the ports include a power interface 12, a USB interface 13, an RS-485 interface 14 and an RS-232 interface 15. A stepper drive motor is arranged in the main rotating unit 8, and the stepper drive motor is connected to the upper computer through the connection port. By combining the main rotating unit 8 with the forearm rotating unit 10, the sample can be able to reach any position of the entire device. The spindle lifting unit 9 enables the forearm and the sample to be converted between the working height and the transportation height. The sample grabbing unit 11 realizes the simultaneous contraction and clamping of the grabbing hand and the relaxation and release of the sample through the structure of the bidirectional screw rod. When multiple titration units 16 are scheduled for grabbing, the robot is requested to be called. After the upper computer obtains the authorization, it will lock the robot through serial communication. After the grabbing is completed and the sample is placed in the robot, each titration unit 16 will unlock the currently exclusive robot until the corresponding sample is finally grabbed in a continuous manner and returned to its original position after the detection is completed.

[0046] Furthermore, the sample base includes a plurality of sample base units 3, each of which is provided with a plurality of positioning recessed holes 4 on the end face close to the sample disk 1, and each of which is provided with two V-shaped positioning grooves 5 on one side face, and two V-shaped positioning protrusions 6 are fixedly connected to the other side face opposite to the V-shaped positioning grooves 5. Two adjacent sample base units 3 are plug-connected via the V-shaped positioning grooves 5 and the V-shaped positioning protrusions 6. The sample disk 1 and the manipulator fixed disk 2 are provided with a plurality of positioning protrusions 7 on the end face close to the sample base, and the positioning protrusions 7 correspond to the positioning recessed holes 4 one by one, so as to realize multi-degree-of-freedom constraint restriction, and unilateral assembly from top to bottom, which is convenient for installation and maintenance. The connection between each sample base unit 3 and the sample disk 1 adopts a fixed and unique positioning protrusion 7 and positioning recessed hole 4, so as to realize the unique directionality of the sample disk 1, facilitate the qualitative identification of the sample, and prevent the user from misoperating the sample.

[0047] Furthermore, the titration unit 16 includes a base 17 and a titration piece 18 and a measuring unit 19 which are snap-connected to the base 17. The base 17 is provided with a plurality of rectangular guide grooves 20, and the user can freely match the titration piece 18 and the measuring unit 19. The end surfaces of the titration piece 18 and the measuring unit 19 close to the base 17 are fixedly connected with bottom guide rails 21, and the bottom guide rails 21 match the rectangular guide grooves 20. A 7-pin socket 22 is provided on the base 17, and a 7-pin plug pin 23 is provided on one end surface of the titration piece 18 and the measuring unit 19 close to the base 17, and a V-shaped positioning protrusion 6 is fixedly connected to one end surface of the base 17, and the V-shaped positioning protrusion 6 matches the V-shaped positioning groove 5 on the sample base unit 3, and a power switch 30, a power interface 31, a second USB interface 32 and a plurality of second 7-pin plug pins 34 are provided on one side surface of the base 17, and a first RS-485 interface 33 and an electrode interface 35 are provided on the primary side surface of the measuring unit 19.

[0048] The sample placed in the sample tray 1 is grasped, lifted, rotated, etc. by a manipulator and transferred to the position of the titration unit 16. The sample is titrated and tested by the titration unit 16, and three channels can be measured simultaneously.

[0049] Furthermore, the number of independent threads established is 3, and the number of mutually exclusive resource establishment permissions between the robot and the plurality of titration units 16 is 1.

[0050] Furthermore, step S104 further includes the following steps:

[0051] 1) Initially, the robot permission is 1;

[0052] 2) The thread decrements the license count by calling the WaitOne method;

[0053] 3) When the count is zero, subsequent requests will be blocked until other threads call the Release method to release the manipulator;

[0054] 4) When all threads release the robot, the count is at the maximum value specified when the robot was created

[0055] The number of devices and processing scales described here are used to simplify the description of the present invention, and the application, modification and variation of the present invention will be obvious to those skilled in the art.

[0056] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and implementation modes. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.

Claims

1. A method for scheduling laboratory electrochemical instruments using signal quantities, characterized in that: Includes the following devices: A sample base and a sample plate (1) and a manipulator fixing plate (2) inserted on the sample base, wherein a plurality of titration units (16) are arranged on one side of the sample base; A plurality of sample plates (1) are plugged into the sample base, a robot is fixed on the robot fixing plate (2), and the robot comprises a main body rotating unit (8), a spindle lifting unit (9) arranged on the main body rotating unit (8), a forearm rotating unit (10) connected to the spindle lifting unit (9), and a sample grabbing unit (11) interactively connected to the forearm rotating unit (10); A plurality of connection ports are arranged on one side surface of the main body rotating unit (8), a stepping drive motor is arranged inside the main body rotating unit (8), and the stepping drive motor is connected to the upper computer via the connection port; The scheduling method includes the following steps: S101, sending a request to the corresponding device through the device search component to allocate an AID; S102, using a thread establishment component to establish an independent thread for the AID, and establishing permissions for mutually exclusive resources of the manipulator and the titration unit (16), wherein the number of the independent threads established is 3, and the number of permissions for mutually exclusive resources established between the manipulator and the plurality of titration units (16) is 1; S103, each independent thread uses the System.Threading.Semaphore class to complete scheduling; S104, the request thread is occupied by WaitOne and released by Release method. The step S104 further includes the following steps: 1) Initially, the robot permission is 1; 2) The thread decrements the license count by calling the WaitOne method; 3) When the count is zero, subsequent requests will be blocked until other threads call the Release method to release the manipulator; 4) When all threads release the robot, the count is at the maximum value specified when the robot was created.

2. A method for scheduling laboratory electrochemical instruments using signal quantities as claimed in claim 1, characterized in that: The sample base comprises a plurality of sample base units (3), and each sample base unit (3) is provided with a plurality of positioning recessed holes (4) on an end surface close to the sample plate (1).

3. A method for scheduling laboratory electrochemical instruments using signal quantities as claimed in claim 2, characterized in that: Two V-shaped positioning grooves (5) are formed on one side of each sample base unit (3), and two V-shaped positioning protrusions (6) are fixedly connected to the other side opposite to the V-shaped positioning grooves (5). Two adjacent sample base units (3) are plug-connected via the V-shaped positioning grooves (5) and the V-shaped positioning protrusions (6).

4. A method for scheduling laboratory electrochemical instruments using signal quantities as claimed in claim 3, characterized in that: A plurality of positioning protrusions (7) are provided on one end surface of the sample plate (1) and the manipulator fixing plate (2) close to the sample base, and the positioning protrusions (7) correspond one to one with the positioning recessed holes (4).

5. A method for scheduling laboratory electrochemical instruments using signal quantities as claimed in claim 1, characterized in that: The titration unit (16) comprises a base (17) and a titration piece (18) and a measuring unit (19) which are snap-connected to the base (17); a plurality of rectangular guide grooves (20) are provided on the base (17); bottom guide rails (21) are fixedly connected to the end surfaces of the titration piece (18) and the measuring unit (19) close to the base (17); the bottom guide rails (21) match the rectangular guide grooves (20).

6. A method for scheduling laboratory electrochemical instruments using signal quantities as claimed in claim 5, characterized in that: A 7-pin socket (22) is provided on the base (17), a 7-pin plug pin (23) is provided on one end surface of the titration piece (18) and the measuring unit (19) close to the base (17), and a V-shaped positioning protrusion (6) is fixedly connected to one end surface of the base (17), and the V-shaped positioning protrusion (6) matches the V-shaped positioning groove (5) on the sample base unit (3).

Citation Information

Patent Citations

  • Device for scheduling laboratory electrochemical instrument by using semaphore

    CN218213046U