Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Subsystem command synchronization method and device

A subsystem and command technology, applied in general control systems, control/regulation systems, instruments, etc., can solve problems such as unpredictable program operation results, reduce complexity, and avoid program errors

Active Publication Date: 2017-08-29
SHENZHEN YIHUA COMP +2
View PDF5 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, in a numerical control system with multiple subsystems, if multiple threads of the main system need to access the same resource, they need to be in a certain order to ensure that the resource can only be accessed by one thread at a certain moment. control, the results of the program will be unpredictable

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Subsystem command synchronization method and device
  • Subsystem command synchronization method and device
  • Subsystem command synchronization method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0054] figure 1 It is a schematic flowchart of a method for synchronizing subsystem commands provided in Embodiment 1 of the present invention. The method in this embodiment is applicable to the situation of synchronizing subsystem commands in a numerical control system including multiple subsystems. It can be executed by a synchronization device commanded by the subsystem, which device can be realized by means of hardware and / or software, and generally can be applied to the main system of the numerical control system.

[0055] see figure 1 , the synchronization method of the subsystem command, comprising:

[0056] S110. When sending a command to each subsystem, select a formal parameter corresponding to each command and pass it into the corresponding command. The formal parameter corresponding to each command is different, and the formal parameter is used for transmission.

[0057] In a control system, it usually includes a main system and a subsystem. Among them, the main...

Embodiment 2

[0072] figure 2 It is a schematic flowchart of a method for synchronizing subsystem commands provided by Embodiment 2 of the present invention. This embodiment is optimized based on the foregoing embodiments, and specifically optimizes the formal parameter corresponding to the command as: a pointer to a response processing function of the command. Correspondingly, after judging whether the response corresponds to the command, the following steps are added before waking up the calling thread: taking out the pointer of the response processing function of the command from the verification parameter queue, and using the response to process The function judges whether the response is normal; correspondingly, when the response corresponds to the command, wake up the calling thread, specifically optimized as: when the response corresponds to the command and is normal, wake up The calling thread.

[0073] see figure 2 , the synchronization method of the subsystem command, compris...

Embodiment 3

[0085] image 3 A schematic flowchart of a method for synchronizing subsystem commands provided by Embodiment 3 of the present invention. This embodiment is optimized on the basis of the above embodiments, and the response processing thread is blocked in the thread queue. The specific optimization is as follows: setting the maximum response duration of the blocked termination trigger condition; correspondingly, the following steps are added: at the maximum When no response is received within the response duration, the calling thread is woken up to output an error.

[0086] see image 3 , the synchronization method of the subsystem command, including:

[0087] S310. When sending a command to the subsystem, select a formal parameter corresponding to the command and pass it into the corresponding command. The formal parameter corresponding to each command is different, and the formal parameter is used for transmission.

[0088] S320. Insert the formal parameter into a preset f...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a subsystem command synchronization method and device. The method comprises: when commands are sent to a subsystem, selecting formal parameters corresponding to the commands and transmitting the formal parameters corresponding to the commands to corresponding commands, wherein the formal parameters corresponding to each command are different, and the formal parameters are used for transmission; inserting the formal parameters into a preset formal parameter queue; blocking calling threads of the commands at the preset formal parameter queue; when responses are received, reading the formal parameters from the formal parameter queue, and determining whether the responses correspond to the commands; and when the responses correspond to the commands, waking up the calling threads, and obtaining a command processing result. Through adoption of message notification modes, the subsystem command synchronization method and device realize command synchronization of a plurality of subsystems so as to avoid program errors caused by asynchronous mode. Besides, message queue interfaces are only needed to perform package to realize command synchronization so as to realize complexity of the software design.

Description

technical field [0001] The invention relates to the technical field of digital control, in particular to a method and device for synchronizing subsystem commands. Background technique [0002] The numerical control system is the abbreviation of the numerical control system, and the English name is (Numerical Control System). According to the control program stored in the computer memory, it performs part or all of the numerical control functions, and is equipped with a dedicated computer system with interface circuits and servo drives. The action control of one or more mechanical equipment is realized by using digital instructions composed of numbers, words and symbols. It usually controls mechanical quantities such as position, angle, speed and electrical switching quantities. [0003] At present, in the numerical control system, the asynchronous method is usually used for control. When the main system sends out a micro-operation control signal, it waits for the "answer" si...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G05B19/042
CPCG05B19/0423G05B2219/25257
Inventor 李意希
Owner SHENZHEN YIHUA COMP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products