Supercharge Your Innovation With Domain-Expert AI Agents!

Method for sharing variables among programs in system and storage device

A technology for sharing variables and programs, applied in multi-programming devices, inter-program communication, program control design, etc., can solve the problems of occupying a large amount of CPU resources of the control mechanism, difficult maintenance, and low real-time performance, so as to save the need for update and maintenance. , The effect of reducing maintenance difficulty and maintenance cost, good backward compatibility and communication efficiency

Pending Publication Date: 2021-04-02
GUANGDONG JATEN ROBOT & AUTOMATION
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The traditional sharing of data between programs is realized through information interaction between two programs, which has low real-time performance and takes up a lot of CPU resources of the control mechanism, which is inefficient. In order to overcome the above problems, the existing shared memory technology uses the main program to assist The program provides the first address of the shared variable library, and the auxiliary program calculates the address based on the first address, combined with the type of the variable, and then obtains the shared variable mapped from the corresponding address, but this method is only suitable for the relatively large amount of data in the shared variable library. In the fixed case, for the case where a new variable needs to be added to the shared variable library, since the correspondence between the address and the variable data changes after the new variable is inserted, if the auxiliary program keeps searching for the variable data based on the first address, Correct variable data cannot be obtained due to wrong mapping, so it is necessary to update the auxiliary program and redefine the new variable interface. For a control mechanism with multiple auxiliary programs, it is necessary to update multiple auxiliary programs, and its maintenance More difficult and more expensive to maintain

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
  • Method for sharing variables among programs in system and storage device
  • Method for sharing variables among programs in system and storage device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0031] see Figure 1 to Figure 2 , the method for sharing variables between programs in the system of this embodiment, the system stores a main program, a number of auxiliary programs and a database, the entity structure involved in the system includes an arithmetic module and a memory, and the arithmetic module and the memory are communicated and connected, A running platform is stored on the operation module, the main program and the auxiliary program run on the running platform, the database is stored in the memory, and the database stores a shared variable list including data addresses and variable data.

[0032] The method for sharing variables between programs in the system includes the following steps:

[0033] (1) The main program reads the data address in the database;

[0034] (2) The main program generates an address-variable mapping file according to the data address and variable data in the database;

[0035] (3) When the auxiliary program is running, the addres...

Embodiment 2

[0047] Another object of the present invention is to provide a storage device, the storage device stores the operating instructions of the method for sharing variables between the programs in the above-mentioned system, and the instructions are suitable for the processor of the computer to load and perform the following operations:

[0048] (A1) Main program and auxiliary program loading instructions;

[0049] (A2) The main program reads the data address in the database;

[0050](A3) The main program generates an address-variable mapping file according to the data address and variable data in the database;

[0051] (A4) Read the address-variable mapping file when the auxiliary program is running to obtain the correspondence between the data address and the variable data;

[0052] (A5) The auxiliary program calls the data in the corresponding data address in the database.

[0053] Compared with the prior art, in the storage device of the present invention, the stored operatio...

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 invention provides a method for sharing variables among programs in a system, which is characterized in that a main program, a plurality of auxiliary programs and a database are stored in the system; the method for sharing the variables among the programs in the system comprises the following steps that a main program reads a data address in a database; the main program generates an address- variable mapping file according to the data address and the variable data in the database; when the auxiliary program runs, the address-variable mapping file is read to obtain a corresponding relationship between the data address and the variable data; and the auxiliary program calls the data in the corresponding data address in the database. According to the method for sharing the variables amongthe programs in the system, the data calling speed is high, the stability is high, and maintenance is convenient.

Description

technical field [0001] The invention relates to the technical field of AGV device control, in particular to a method and a storage device for sharing variables among programs in a system. Background technique [0002] There are a variety of control programs stored in the AGV control mechanism, including the main program and auxiliary programs. The main program contains the core control function, with a large amount of operating data, stable operating speed, and high read and write restrictions. The main program is modified, and the auxiliary program runs independently of the main program. The auxiliary program needs to be modified according to the actual application. The auxiliary program shares data with the main program during the running process to reduce the amount of stored data. [0003] The traditional shared data between programs is realized by information exchange between two programs, which has low real-time performance, and occupies a large amount of CPU resources...

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): G06F9/54
CPCG06F9/544G06F9/547
Inventor 胡政李丹
Owner GUANGDONG JATEN ROBOT & AUTOMATION
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More