Robot control device, control method, and recording medium
By establishing the same size cache area between the volatile memory and the nonvolatile memory in the robot control device, and using software to control the writing and reading of data, the robot control device hardware does not support cache lines. The problem of slow data reading/writing speed caused by the function realizes high-speed data processing.
Patent Information
- Application Number
- CN202280096759.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2025-01-14
AI Technical Summary
Due to the hardware structure of the robot control device, the data is read/write speed is slow, affecting the program running time of the processor.
By ensuring a cache area of the same size as the nonvolatile memory in the volatile memory and using software control to write data to the nonvolatile memory when writing data, from volatile when reading data The memory reads data to realize the cache of data.
Even when the robot control device does not have the cache line function, it can still process the read/write of data at a high speed, shortening the program execution time.
Smart Images

Figure CN119317523A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a robot control device, a control method and a recording medium. Background Art
[0002] Generally, a cache memory is provided to increase the speed of writing / reading data. The cache memory is used to store frequently used data in advance in a memory with fast writing / reading speed such as an SRAM.
[0003] The cache memory is written to a nonvolatile memory such as a FLASH memory (registered trademark) at a certain timing. The correspondence between the cache memory and the nonvolatile memory has a control method called cache line.
[0004] Since cache line control is complex and time-consuming, cache memory is used by processor hardware to control cache line functions. Hardware can be used to process cache line functions in the background and in parallel with program execution, which has little impact on program execution.
[0005] On the other hand, the robot control device always stores data in a nonvolatile memory in order to retain the data immediately before the power is turned off, so that even if the power is turned off due to a power outage during the operation of the robot, the state immediately before can be restored.
[0006] In order to recover normally from power failure, the robot control device must save data in a non-volatile memory, but it is known that the reading / writing time of data in the non-volatile memory is long, and the data reading / writing speed will have a great impact on the running time of the processor program. Therefore, the robot control device usually has a volatile memory with faster data reading / writing speed than the non-volatile memory. When the volatile memory with short reading / writing time is used as a cache memory, the program execution time can be shortened.
[0007] Prior art literature
[0008] Patent Literature
[0009] Patent Document 1: Japanese Patent Application Publication No. 2013-198958 Summary of the invention
[0010] Problems to be solved by the invention
[0011] However, the robot control device may not support the cache line function due to its hardware configuration.
[0012] Therefore, it is desired to process data reading / writing at high speed even when the robot control device does not have a cache line function.
[0013] Means for solving problems
[0014] One method of the robot control device disclosed in the present invention is a robot control device including a processor, a non-volatile memory and a volatile memory, wherein the processor performs the following processing: ensuring a cache memory area of the same size as a predetermined area of the non-volatile memory in the volatile memory; and when writing data to the cache memory area of the volatile memory through software control, also writing data to the predetermined area of the non-volatile memory, and when reading data, reading data from the volatile memory.
[0015] One aspect of the control method disclosed herein is a control method for a robot control device including a processor, a non-volatile memory, and a volatile memory, the control method comprising the following steps: an ensuring step, wherein the processor ensures a cache memory area of the same size as a predetermined area of the non-volatile memory in the volatile memory; and a reading step, wherein when the processor writes data to the cache memory area of the volatile memory through software control, the processor also writes data to the predetermined area of the non-volatile memory, and when reading data, the processor reads data from the volatile memory.
[0016] One form of the recording medium disclosed in the present invention is a recording medium that can be read by a processor, which records a program for causing a processor of a robot control device including a non-volatile memory and a volatile memory to perform the following functions: ensuring a cache memory area of the same size as a predetermined area of the non-volatile memory in the volatile memory; and when writing data to the cache memory area of the volatile memory through software control, also writing data to the predetermined area of the non-volatile memory, and when reading data, reading data from the volatile memory.
[0017] Effects of the Invention
[0018] According to one aspect, even when the robot control device does not have a cache line function, data reading / writing can be processed at a high speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a diagram showing an example of the hardware configuration of a robot control device according to an embodiment.
[0020] Figure 2 This is a diagram showing an example of the relationship between the address space of the nonvolatile memory and the address space of the volatile memory.
[0021] Figure 3 This is a flowchart for explaining the writing process of the robot control device.
[0022] Figure 4 This is a flowchart explaining the reading process of the robot control device. DETAILED DESCRIPTION
[0023] Hereinafter, a robot control device according to an embodiment will be described in detail with reference to the drawings.
[0024] <One Implementation Method>
[0025] Figure 1 This is a diagram showing an example of the hardware configuration of a robot control device according to an embodiment.
[0026] The robot control device 1 is a well-known robot control device for those skilled in the art, and can be directly connected to a robot (not shown) via a connection interface (not shown). In addition, the robot control device 1 can be connected to a robot (not shown) via a network (not shown) such as a LAN (Local Area Network) or the Internet. In this case, the robot control device 1 can also include a communication unit (not shown) for communicating with the robot (not shown) through the connection.
[0027] The robot control device 1 generates commands based on a robot program created using a teaching pendant (not shown), for example, and sends the generated commands to a robot (not shown). The robot control device 1 thereby controls the operation of the robot (not shown).
[0028] like Figure 1 As shown, the robot control device 1 includes a CPU 10 and a storage unit 20 . The CPU 10 and the storage unit 20 are connected to each other via a bus 30 so as to be communicable.
[0029] The CPU 10 is a processor that controls the robot controller 1 as a whole. The CPU 10 reads out a system program of an OS and various software applications stored in a storage unit 20 described later via a bus 30 and controls the robot controller 1 as a whole according to the system program and the application programs.
[0030] The storage unit 20 includes a nonvolatile memory 201 and a volatile memory 202 .
[0031] The nonvolatile memory 201 is an SSD (Solid State Drive), an HDD (hard disk drive), an SRAM with a backup power supply, or the like, and stores an OS, various software, and various setting files.
[0032] The OS is, for example, an operating system (OS) or a system program executed in the robot controller 1 .
[0033] The various software includes, for example, a robot operation program (not shown) and an application program that realizes various functions such as control of cache lines of the robot control device 1 .
[0034] The various setting files are, for example, setting files for software stored in various software.
[0035] The volatile memory 202 is, for example, a RAM (Random Access Memory) and loads various files stored in the nonvolatile memory 201 as needed to use them for calculation processing by the CPU 10 .
[0036] In addition, the CPU 10 caches the data of the non-volatile memory 201 to the volatile memory 202 by software control, such as Figure 2 As shown in FIG. 1 , address spaces of the same data size are secured (set) in the nonvolatile memory 201 and the volatile memory 202. Figure 2 For example, the nonvolatile memory 201 reserves (sets) the address space from "0x3000" to "0x4000" (area 1) as a predetermined area, and the volatile memory 202 reserves (sets) the address space from "0x6000" to "0x7000" (area 2) as a cache memory area. That is, the address space of area 1 reserved in the nonvolatile memory 201 and the address space of area 2 reserved in the volatile memory 202 are in one-to-one correspondence, so that the CPU 10 can derive the address of the volatile memory 202 that always corresponds to the address of the nonvolatile memory 201 with a predetermined amount of offset. In addition, the CPU 10 can derive the address of the nonvolatile memory 201 that always corresponds to the address of the volatile memory 202 with a predetermined amount of offset.
[0037] When the CPU 10 writes data to the address space of area 2 secured in the cache volatile memory 202, the data is also written to area 1 secured in the corresponding nonvolatile memory 201. On the other hand, when the CPU 10 reads data, the cached data is read from the volatile memory 202.
[0038] Thus, the CPU 10 fixes the data of the nonvolatile memory 201 and the volatile memory 202 of the cache memory in the same address space, thereby fixing the cache line and performing write-through. Thus, even a robot control device without a cache line function can perform control equivalent to the cache line control.
[0039] <Writing Process of Robot Controller 1>
[0040] Next, refer to Figure 3 The flow of the writing process of the robot controller 1 will be described.
[0041] Figure 3 This is a flowchart for explaining the writing process of the robot control device 1. The flow shown here is executed every time data to be written to the storage unit 20 is received.
[0042] In step S11 , the CPU 10 obtains data to be written in the storage unit 20 and an address of a writing destination.
[0043] In step S12, the CPU 10 determines whether the address of the write destination is an address of area 2 secured in the volatile memory 202. When the address of the write destination is an address of area 2 secured in the volatile memory 202, the CPU 10 derives an address of area 1 secured in the corresponding nonvolatile memory 201, and the process proceeds to step S13. On the other hand, when the address of the write destination is not an address of area 2 secured in the volatile memory 202, the process proceeds to step S14.
[0044] In step S13 , the CPU 10 writes the data received in step S11 into the area 1 reserved in the nonvolatile memory 201 .
[0045] In step S14 , the CPU 10 writes the data received in step S11 into the address of the volatile memory 202 acquired in step S11 .
[0046] <Reading Process of Robot Controller 1>
[0047] Next, refer to Figure 4 The procedure of the reading process of the robot controller 1 will be described.
[0048] Figure 4 This is a flowchart for explaining the reading process of the robot control device 1. The flow shown here is executed every time a data reading instruction is received.
[0049] In step S21 , the CPU 10 obtains a data read instruction and an address of a read destination in the storage unit 20 .
[0050] In step S22, the CPU 10 determines whether the address of the read destination is an address of area 1 reserved in the nonvolatile memory 201. When the address of the read destination is an address of area 1 reserved in the nonvolatile memory 201, the process proceeds to step S23. On the other hand, when the address of the read destination is an address outside area 1 reserved in the nonvolatile memory 201, the process proceeds to step S24.
[0051] In step S23 , the CPU 10 derives the address of the area 2 reserved in the volatile memory 202 , which corresponds to the address of the read destination.
[0052] In step S24 , the CPU 10 reads data of the address acquired in step S21 or the address derived in step S23 from the storage unit 20 .
[0053] As described above, the robot control device 1 of one embodiment reserves (sets) address space area 1 and area 2 of the same data size in advance in the non-volatile memory 201 and the volatile memory 202, and obtains a one-to-one correspondence. Thus, even when the robot control device does not have a cache line function, data reading / writing can still be processed at a high speed.
[0054] Furthermore, since the robot control device 1 is implemented by software, cache memory can be performed even if the hardware configuration is not compatible with cache memory.
[0055] Furthermore, the robot control device 1 can quickly process the cache without using cache line control.
[0056] Although one embodiment has been described above, the robot control device 1 is not limited to the above embodiment, and includes modifications, improvements, and the like within a range that can achieve the purpose.
[0057] In addition, each function included in the robot control device 1 in one embodiment can be realized by hardware, software, or a combination of these. Here, realization by software means that the computer reads and executes the program to realize.
[0058] The program can be stored and supplied to the computer using various types of non-transitory computer readable media (Non-transitory computer readable medium). Non-transitory computer readable media include various types of tangible recording media (Tangible storage medium). Examples of non-transitory computer readable media include magnetic recording media (e.g., floppy disks, magnetic tapes, hard disk drives), optical magnetic recording media (e.g., magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, semiconductor memories (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash ROMs, RAMs). In addition, the program can also be supplied to the computer via various types of transient computer readable media (Transitory computer readable medium). Examples of transient computer readable media include electrical signals, optical signals, and electromagnetic waves. Transitory computer readable media can supply the program to the computer via wired communication paths such as wires and optical fibers, or via wireless communication paths.
[0059] Furthermore, the steps described in the program recorded in the recording medium naturally include processing performed in time series according to the order, but are not necessarily processed in time series and also include processing executed in parallel or individually.
[0060] To put the above in other words, the robot control device, control method, and recording medium disclosed herein can take various embodiments having the following configurations.
[0061] (1) The robot control device 1 disclosed in the present invention is a robot control device including a CPU 10, a non-volatile memory 201 and a volatile memory 202. The CPU 10 ensures a cache memory area of the same size as a predetermined area of the non-volatile memory 201 in the volatile memory 202. When writing data to the cache memory area of the volatile memory 202 through software control, the data is also written to the predetermined area of the non-volatile memory 201. When reading data, the data is read from the volatile memory 202.
[0062] According to the robot control device 1, even when the robot control device does not have a cache line function, data reading / writing can be processed at a high speed.
[0063] (2) In the robot control device 1 described in (1), a predetermined area of the non-volatile memory 201 and a cache memory area of the volatile memory 202 have a one-to-one relationship in the address space, and the CPU 10 derives the address of the non-volatile memory 201 which always corresponds to a predetermined amount of offset based on the address of the volatile memory 202.
[0064] (3) The control method disclosed in the present invention is a control method for a robot control device 1 including a CPU 10, a non-volatile memory 201 and a volatile memory 202, and the control method comprises the following steps: an ensuring step, in which the CPU 10 ensures a cache memory area of the same size as a predetermined area of the non-volatile memory 201 in the volatile memory 202; and a reading step, in which the CPU 10 writes data to the predetermined area of the non-volatile memory 201 when writing data to the cache memory area of the volatile memory 202 through software control, and reads data from the volatile memory 202 when reading data.
[0065] According to this control method, the same effect as (1) can be achieved.
[0066] (4) The recording medium disclosed in the present invention is a recording medium having a program recorded thereon and readable by CPU10, wherein the program is used to enable CPU10 of a robot control device 1 including a non-volatile memory 201 and a volatile memory 202 to perform the following functions: ensuring a cache memory area of the same size as a predetermined area of the non-volatile memory 201 in the volatile memory 202; and when writing data to the cache memory area of the volatile memory 202 through software control, also writing data to the predetermined area of the non-volatile memory 201, and when reading data, reading data from the volatile memory.
[0067] According to this recording medium, the same effect as (1) can be achieved.
[0068] Explanation of symbols
[0069] 1Robot control device
[0070] 10CPU
[0071] 20 Storage unit
[0072] 201 Non-volatile Memory
[0073] 202 Volatile Memory
[0074] 30 bus.
Claims
1. A robot control device comprising a processor, a non-volatile memory and a volatile memory, characterized in that: The processor performs the following processing: securing a cache memory area having the same size as a predetermined area of the nonvolatile memory in the volatile memory; and When data is written to the cache memory area of the volatile memory by software control, data is also written to a predetermined area of the nonvolatile memory, and when data is read, data is read from the volatile memory.
2. The robot control device according to claim 1, characterized in that: The cache memory area of the volatile memory and the predetermined area of the nonvolatile memory have a one-to-one relationship in the address space, and the processor derives the address of the nonvolatile memory that always corresponds to the address of the volatile memory at a predetermined offset.
3. A control method for a robot control device, the robot control device comprising a processor, a non-volatile memory and a volatile memory, characterized in that: The control method comprises the following steps: a securing step, wherein the processor secures in the volatile memory a cache memory area having the same size as a predetermined area of the nonvolatile memory; as well as In the reading step, when the processor writes data to the cache memory area of the volatile memory through software control, the processor also writes data to a predetermined area of the nonvolatile memory, and when reading data, the processor reads data from the volatile memory.
4. A processor-readable recording medium having a program recorded thereon for causing a processor of a robot control device including a nonvolatile memory and a volatile memory to perform the following function, characterized in that: securing a cache memory area having the same size as a predetermined area of the nonvolatile memory in the volatile memory; and When data is written to the cache memory area of the volatile memory by software control, data is also written to a predetermined area of the nonvolatile memory, and when data is read, data is read from the volatile memory.
Citation Information
Patent Citations
Robot control device
JP2013198958A
Multichip dual write
CN107112044A
Storage device of heterogeneous namespace and application thereof in database
CN111858401A
Cache Management Including Solid State Device Virtualization
US20130042056A1
Memory device and memory control method
US20170060706A1