Control system

By generating a shared variable access library, the offset and size information of shared variables are automatically processed, which solves the user's programming burden and compatibility issues, and enables flexible control program development.

CN121970005APending Publication Date: 2026-05-01FANUC LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202380102920.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-11
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, users need to explicitly use call handling for accessing shared variables when programming, which increases the programming burden. Furthermore, when the definition of shared variables changes, the program needs to be recompiled, affecting compatibility.

Method used

By generating a shared variable access library, offset and size information are automatically extracted, and calls to the shared variable access library are inserted into the control program, reducing manual operations by users and supporting changes to shared variable definitions without recompiling.

Benefits of technology

It reduces the programming burden on users, improves the flexibility and compatibility of control programs, and avoids recompilation problems caused by changes in the definition of shared variables.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121970005A_ABST
    Figure CN121970005A_ABST
Patent Text Reader

Abstract

The purpose of the present invention is to reduce the burden on a user for creating a control program when a call process for accessing a shared variable is not definitely used during creation of the control program. The control system includes: a plurality of peripheral devices; and a control device that includes a shared variable that can be shared with a plurality of peripheral devices, the control device including: a library generation unit that extracts shared variable information including at least information about an offset and a size from the definition of the shared variable, and generates a shared variable access library for accessing the shared variable on the basis of the shared variable information; each of the plurality of peripheral devices includes: an analysis unit that analyzes a reference code referring to a shared variable from an executed control program; a conversion unit that inserts, at the position of the reference code analyzed by the analysis unit, a call conversion control program of the shared variable access library that accesses the shared variable referenced by the reference code; and an execution unit that executes the control program converted by the conversion unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to a control system for a control device having multiple peripheral machines and including a shared variable shared among the multiple peripheral devices. Background Technology

[0002] In numerical control (NC) devices, shared variables are defined in the storage area to enable data sharing with applications running on peripheral devices such as PLC (Programmable Logic Controller) software, display software, and network software, and these variables can be accessed from each application. For example, see Patent Document 1.

[0003] At this point, access to shared variables from various applications is performed through dedicated access functions, which handle exclusive control, communication, and other functions.

[0004] Access functions for shared variables take information about the variable to be accessed (offset or size, etc.) as input when executing.

[0005] Existing technical documents

[0006] Patent documents

[0007] Patent Document 1: Japanese Patent Application Publication No. 2020-064399 Summary of the Invention

[0008] The problem that the invention aims to solve

[0009] Figure 10 This is a diagram illustrating an example of the relationship between the access functions 101A~101C of the numerical control device 100 and the access functions of the peripheral devices 200A~200C. Figure 10 In the examples 200A~200C, peripheral devices include communication devices, display devices, and PLCs. Additionally, in... Figure 10 The document describes how peripheral devices 200A to 200C are included in the numerical control device 100, but they can also be different devices that are not included in the numerical control device 100 but can be communicatively connected to the numerical control device 100.

[0010] The numerical control device 100 has access functions 101A-101C for managing shared variables to prevent conflicts in access from peripheral devices 200A-200C. Specifically, access functions 101A-101C use semaphores or similar methods for exclusive control to prevent duplicate execution of access requests from peripheral devices 200A-200C to the same shared variable. Furthermore, if other peripheral devices 200A-200C do not access a certain shared variable, access functions 101A-101C will return a notification to the peripheral devices 200A-200C indicating that they are able to execute the shared variable access request.

[0011] On the other hand, when a program in peripheral devices 200A-200C accesses a shared variable, the program specifies the shared variable to be accessed using information such as offset and size, and notifies the numerical control device 100 of the request to access the shared variable. Therefore, regarding peripheral devices 200A-200C, if the access request is granted, access to the shared variables of the numerical control device 100 can be performed; if the access request is denied, access to the shared variables cannot be performed. Thus, the access functions 101A-101C of the numerical control device 100 and the program accessing the shared variables in peripheral devices 200A-200C are in a relationship where they can send and receive data. At this time, if the numerical control device 100 and peripheral devices 200A-200C are connected via a network, data forwarding is also performed.

[0012] However, in the existing technology, when accessing shared variables from applications in various peripheral devices, it is necessary to explicitly use the call handling for accessing shared variables, and the calculation of offsets, sizes, etc., becomes a programming burden for users.

[0013] In addition, if the definition of a shared variable changes, compatibility issues arise in accessing the shared variable, thus requiring the program to be recompiled.

[0014] Therefore, it is hoped that by not explicitly using access to shared variables in the creation of control programs, the burden on users in creating control programs can be reduced.

[0015] Methods for solving problems

[0016] One aspect of the control system disclosed herein includes: a plurality of peripheral devices; and a control device comprising shared variables that can be shared among the plurality of peripheral devices. The control device includes: a library generation unit that extracts shared variable information, including at least offset and size information, from the definition of the shared variables, and generates a shared variable access library for accessing the shared variables based on the shared variable information. Each of the plurality of peripheral devices includes: a parsing unit that parses reference codes that refer to the shared variables from an executed control program; a conversion unit that converts the control program by inserting calls to the shared variable access library for accessing the shared variables referenced by the reference codes at the positions of the reference codes parsed by the parsing unit; and an execution unit that executes the control program converted by the conversion unit. Attached Figure Description

[0017] Figure 1 This is a diagram illustrating an example of the functional block structure of the control system in the first embodiment.

[0018] Figure 2This is a diagram representing an example of a shared variable definition table.

[0019] Figure 3 This is a diagram representing an example of a template.

[0020] Figure 4 This is a diagram illustrating an example of a library used for accessing shared variables.

[0021] Figure 5 This is a diagram illustrating a sequence program as a control program when the peripheral device is a PLC.

[0022] Figure 6 This is a diagram illustrating an example of the converted control program.

[0023] Figure 7 This is a flowchart that explains the control processing of the control system.

[0024] Figure 8 This is a diagram illustrating an example of the functional block structure of the control system in the second embodiment.

[0025] Figure 9 This is a flowchart that explains the control processing of the control system.

[0026] Figure 10 This is a diagram illustrating an example of the relationship between the access functions of a numerical control device and the access functions of a peripheral device. Detailed Implementation

[0027] <First Implementation>

[0028] Hereinafter, the control system of the first embodiment will be described in detail with reference to the accompanying drawings.

[0029] Figure 1 This diagram illustrates an example of the functional block structure of the control system according to the first embodiment. Here, a numerical control device for controlling a machine tool is exemplified as the control device. Furthermore, the present invention can also be applied to a robot control device for controlling a robot.

[0030] like Figure 1 As shown, the control system 1 has a numerical control device 10 and N peripheral devices 20(1) to 20(N).

[0031] The numerical control device 10 and peripheral devices 20(1) to 20(N) are directly connected to each other via a connection interface not shown. Alternatively, the numerical control device 10 and peripheral devices 20(1) to 20(N) can also communicate with each other via a network not shown, such as a LAN (Local Area Network) or the Internet. In this case, the numerical control device 10 and peripheral devices 20(1) to 20(N) have a communication unit not shown for communicating with each other via this connection.

[0032] In addition, the numerical control device 10 and the peripheral devices 20(1) to 20(N) are different devices, but as will be described later, the peripheral devices 20(1) to 20(N) may also be included in the numerical control device 10.

[0033] Furthermore, in the following, without needing to distinguish between peripheral devices 20(1) to 20(N) separately, they will also be collectively referred to as "peripheral device 20".

[0034] <Numerical Control Device 10>

[0035] The numerical control device 10 is, for example, a numerical control device known to those skilled in the art for controlling the movement of a machine tool (not shown). Furthermore, if the machine tool (not shown) is a robot or the like, the numerical control device 10 may also be a robot control device or the like.

[0036] The numerical control device 10 includes, for example, a control unit 11 and a storage unit 12. In addition, the control unit 11 includes a library generation unit 110.

[0037] Storage unit 12 may be ROM (Read Only Memory), SSD (Solid State Drive), HDD (Hard Disk Drive), etc. Storage unit 12 contains the operating system and application programs executed by control unit 11, and also contains shared variable definitions 120, shared variables 121, and template storage unit 122.

[0038] Store the shared variable definition table in shared variable definition 120.

[0039] Figure 2 This is a diagram representing an example of a shared variable definition table.

[0040] The shared variable definition table contains information related to the offset and size of each variable, and has storage areas for "variable", "data type", "offset" and "size".

[0041] In the storage area of ​​"variables" within the shared variable definition table, variable names such as "X", "Y", and "Z" are stored.

[0042] Within the "Data Type" storage area of ​​the shared variable definition table, variables stored in the "Variable" storage area are of data types such as "LINT", "REAL", and "STRING".

[0043] In the "Offset" storage area within the shared variable definition table, the offset value of the variable stored in the storage area "Variable" is stored.

[0044] The size of the variable stored in the storage area "Variable" within the shared variable definition table is stored in the "Size" storage area.

[0045] The shared variable 121 stores the values ​​(e.g., numerical values, strings, etc.) of variables shared between two or more peripheral devices 20 (1) to 20 (N). For example, if a display device and a PLC are present as peripheral devices 20, the display device stores the string input through the displayed screen as a shared variable in the shared variable 121, and the PLC can perform processing by accepting the string input through the shared variable 121. In addition, the PLC can store the processing result in the shared variable 121, and the display device can receive the processing result executed by the PLC through the shared variable 121 and display the processing result.

[0046] The template storage unit 122 stores a template that pre-describes the code for accessing the shared variable 121 and allows input of shared variable information such as offset and size.

[0047] Figure 3 This is a diagram representing an example of a template.

[0048] exist Figure 3 The template shown stores the variable names, offsets, and sizes extracted from the shared variable definition 120 (shared variable definition table) by the library generation unit 110 described later, and generates a shared variable access library.

[0049] The control unit 11 includes a CPU, ROM, RAM, CMOS memory, etc., which are configured to communicate with each other via a bus, as is known to those skilled in the art.

[0050] The CPU is the processor that controls the numerical control device 10 as a whole. The CPU reads the system program and application program stored in ROM via the bus, and controls the numerical control device 10 according to the system program and application program. Thus, as... Figure 1 As shown, the control unit 11 is configured to implement the functions of the library generation unit 110. Various data, such as temporary calculation data and display data, are stored in RAM. The CMOS memory is configured as a non-volatile memory that is backed up by a battery (not shown) and maintains its storage state even when the power supply to the numerical control device 10 is disconnected.

[0051] The library generation unit 110 extracts shared variable information, which includes at least the offset and size of the shared variable, from the shared variable definition 120, and generates a shared variable access library for accessing the shared variable based on the shared variable information.

[0052] Specifically, the library generation unit 110, for example, extracts shared variable information such as the offset and size of the variable name "Y" from the shared variable definition 120 (shared variable definition table) as a shared variable. The library generation unit 110 stores the extracted shared variable information's offset and size in a template stored in the template storage unit 122, thereby... Figure 4 As shown, a shared variable access library for accessing the shared variable "Y" is generated. The library generation unit 110 forwards the generated shared variable access library to the peripheral device 20.

[0053] In addition, the library generation unit 110 can also extract the shared variable information of the added or updated shared variables in the shared variable definition 120, and generate a shared variable access library for accessing the added or updated shared variables based on the shared variable information.

[0054] <Peripheral Devices 20>

[0055] Peripheral devices 20 may be communication devices, display devices, PLCs, etc., and may include a control unit 21 and a storage unit 22. Furthermore, the control unit 21 includes a parsing unit 210, a conversion unit 211, and an execution unit 212.

[0056] In addition, Figure 1 The text only represents the functional blocks of peripheral device 20 (1), but peripheral devices 20 (2) to 20 (N) are the same as peripheral device 20 (1).

[0057] Furthermore, the following explanation will illustrate the case where the peripheral device 20(1) is a PLC. However, the same applies if the peripheral device 20(1) is a communication device, display device, or other device other than a PLC.

[0058] Storage unit 22 can be ROM, SSD, HDD, etc. Storage unit 22 contains the operating system and application programs executed by control unit 21, and control program storage unit 220. Furthermore, storage unit 22 can also store shared variable access libraries forwarded from numerical control device 10.

[0059] The control program storage unit 220 stores a user-created control program that is executed by the peripheral device 20.

[0060] Figure 5 This is a diagram illustrating a sequence program for a control program when the peripheral device 20 (1) is a PLC.

[0061] The control unit 21 includes a CPU, ROM, RAM, CMOS memory, etc., which are configured to communicate with each other via a bus, as is known to those skilled in the art.

[0062] The CPU is the processor that controls the peripheral device 20 (1) as a whole. The CPU reads the system program and application program stored in the ROM via the bus, and controls the peripheral device 20 (1) as a whole according to the system program and application program. Thus, as... Figure 1 As shown, the control unit 21 is configured to perform the functions of the parsing unit 210, the conversion unit 211, and the execution unit 212. Various data, such as temporary calculation data and display data, are stored in the RAM. The CMOS memory is configured as a non-volatile memory that is backed up by a battery (not shown) and maintains its storage state even when the power supply to the peripheral device 20 (1) is disconnected.

[0063] The parsing unit 210 parses the reference code of the reference shared variable from the control program executed by the execution unit 212 (described later).

[0064] Specifically, the parsing unit 210, for example, reads from the control program storage unit 220 the code executed by the execution unit 212 (described later). Figure 5 The sequence program (control program) retrieves code from the read sequence program that includes access to shared variables (e.g., "Y"). The parsing unit 210 then processes the corresponding code (e.g., ... Figure 5 The line position of the sequence program (line 5) is output to the conversion section 211 as the reference code.

[0065] The conversion unit 211 inserts a call to a shared variable access library that accesses shared variables referenced by the reference code at the line position of the reference code parsed by the parsing unit 210 to convert the control program.

[0066] Specifically, the conversion unit 211 receives, for example, a shared variable access library generated by the numerical control device 10. For example... Figure 6 As shown, the conversion unit 211 in Figure 5 Insert the 5th line of the sequence program Figure 4 Access to shared variables is achieved through library calls. For example... Figure 6 As shown, the conversion unit 211 converts the code that accesses the shared variable "Y" into a code that stores the information of the variable "Y". Figure 4 Access to the temporary variable "y'" whose value is read from the library is used for shared variable access. The conversion unit 211 converts the value... Figure 6 The sequence program is forwarded to the execution unit 212, which will be described later.

[0067] The execution unit 212 executes the sequence program (control program) converted by the conversion unit 211. The execution unit 212 executes the converted sequence program and accesses the shared variable "Y" stored in the shared variable 121 of the numerical control device 10. In addition, at this time, the control unit 11 (access function) in the numerical control device 10 can also perform exclusive control so that the access to the shared variable "Y" does not conflict with the peripheral device 20 (1) and the peripheral device 20 (i) (i is an integer from 2 to N).

[0068] Therefore, the peripheral device 20 (1) does not require the user to explicitly use the access function of the shared variable, which can reduce the burden on the user to make control programs.

[0069] <Control Processing of Control System 1>

[0070] Next, refer to Figure 7 The control processing flow of control system 1 will be explained.

[0071] Figure 7 This is a flowchart illustrating the control processing of control system 1.

[0072] In step S11, the numerical control device 10 (library generation unit 110) extracts shared variable information, including the variable name, offset, and size of the shared variables, from the shared variable definition 120 (shared variable definition table).

[0073] In step S12, the numerical control device 10 (library generation unit 110) stores the variable name, offset and size of the shared variable information extracted in step S11 in a template stored in the template storage unit 122, thereby generating a shared variable access library.

[0074] In step S13, the numerical control device 10 (library generation unit 110) forwards the shared variable access library generated in step S12 to the peripheral device 20 (1).

[0075] In step S21, the peripheral device 20 (1) (conversion unit 211) receives the shared variable access library forwarded in step S13.

[0076] In step S22, the peripheral device 20 (1) (parse unit 210) reads the control program to be executed from the control program storage unit 220 and accesses the reference code of the shared variable 121 of the numerical control device 10 by parsing the read control program.

[0077] In step S23, the peripheral device 20 (1) (conversion unit 211) inserts the call to the shared variable access library received in step S21 into the line position of the reference code parsed in step S22, and converts the control program read in step S22.

[0078] Based on the above, the control system 1 of the first embodiment can reduce the burden on users in creating control programs when the call processing of access shared variables is not explicitly used in the creation of the control program.

[0079] In addition, even if there are additions or changes in the shared variable definition 120, the control system 1 generates a shared variable access library to transform the control program each time, so that the user does not need to manually recompile the control program.

[0080] The first embodiment has been described above.

[0081] <Second Implementation>

[0082] Next, the second embodiment will be described. As described above, in the first embodiment, the numerical control device 10 extracts at least the offset and size of the shared variable information from the shared variable definition 120, and generates a shared variable access library for accessing the shared variables based on the shared variable information. The peripheral device 20 parses the reference code of the shared variable from the control program, inserts a call to the shared variable access library at the position of the parsed reference code to convert the control program, and executes the converted control program. In contrast, in the second embodiment, the control system 1 has a program editing device 30, and the numerical control device 10A outputs the shared variable definition 120 to the program editing device 30. The difference from the first embodiment is that the program editing device 30, based on the user's input operation, generates control programs for the peripheral devices 20(1) to 20(N) that reference the shared variable according to the shared variable definition 120 received from the numerical control device 10A, and outputs them to the peripheral devices 20(1) to 20(N) respectively.

[0083] Therefore, the control system 1 can reduce the burden on users in creating control programs without explicitly using access to shared variables during the creation of the control program.

[0084] The second embodiment will be described below.

[0085] Figure 8 This is a diagram illustrating an example of the functional block structure of the control system according to the second embodiment. Furthermore, for systems having... Figure 1 The elements of control system 1 that have the same functions are labeled with the same symbols, and detailed descriptions are omitted.

[0086] like Figure 8 As shown, the control system 1 includes: a numerical control device 10A, peripheral devices 20 (1) to 20 (N) and a program editing device 30.

[0087] The numerical control device 10A, peripheral devices 20(1) to 20(N), and program editing device 30 are directly connected to each other via a connection interface not shown. Alternatively, the numerical control device 10A, peripheral devices 20(1) to 20(N), and program editing device 30 can also communicate with each other via a network not shown, such as a LAN or the Internet. In this case, the numerical control device 10A, peripheral devices 20(1) to 20(N), and program editing device 30 have a communication unit not shown for communicating with each other via this connection.

[0088] Furthermore, the peripheral devices 20(1) to 20(N) have the same functions as the peripheral devices 20(1) to 20(N) in the first embodiment.

[0089] The numerical control device 10A, for example, controls the operation of a machine tool (not shown), similar to the numerical control device 10 of the first embodiment, and is a known numerical control device to those skilled in the art. Furthermore, if the machine tool (not shown) is a robot or the like, the numerical control device 10A could also be a robot control device or the like.

[0090] The numerical control device 10A includes, for example, a control unit 11a and a storage unit 12. Furthermore, the control unit 11a includes a library generation unit 110 and a shared variable definition output unit 111.

[0091] The storage unit 12 has the same function as the storage unit 12 in the first embodiment.

[0092] The shared variable definition 120, shared variable 121, and template storage unit 122 are the same as those in the first embodiment.

[0093] The control unit 11a includes a CPU, ROM, RAM, CMOS memory, etc., which are configured to communicate with each other via a bus, as is known to those skilled in the art.

[0094] The CPU is the processor that controls the numerical control device 10A as a whole. The CPU reads the system program and application program stored in ROM via the bus, and controls the numerical control device 10A according to the system program and application program. Thus, as... Figure 8 As shown, the control unit 11a is configured to implement the functions of the library generation unit 110 and the shared variable definition output unit 111.

[0095] The library generation unit 110 has the same function as the library generation unit 110 in the first embodiment.

[0096] For example, the shared variable definition output unit 111 outputs the shared variable definition 120 to the program editing device 30.

[0097] <Program Editing Device 30>

[0098] The program editing device 30 is, for example, a computer, a tablet terminal, etc., and is configured by including a compiler 31.

[0099] In addition, in order to achieve Figure 8 The program editing device 30 includes an arithmetic processing unit (not shown) such as a CPU, which controls the operation of function blocks. Additionally, the program editing device 30 includes auxiliary storage devices (not shown) such as ROM, SSD, and HDD that store various control programs, and a main storage device (not shown) such as RAM that stores data temporarily needed by the arithmetic processing unit when executing programs.

[0100] Furthermore, in the program editing device 30, the arithmetic processing unit reads the OS and application software from the auxiliary storage device, and while the read OS and application software are expanded in the main storage device, arithmetic processing is performed based on these OS and application software. Based on the results of this processing, the program editing device 30 controls the various hardware components. Thus, [the following is achieved / implemented]... Figure 8 The processing of function blocks. That is, the program editing device 30 can achieve this through hardware and software cooperation.

[0101] The compiler 31, for example, creates control programs for peripheral devices 20(1) to 20(N) that refer to the shared variable based on input operations from the user via input devices (not shown) such as keyboards or touch panels included in the program editing device 30 and the shared variable definition 120 received from the numerical control device 10A. The compiler 31 compiles the created control programs and outputs them to the peripheral devices 20(1) to 20(N).

[0102] <Control Processing of Control System 1>

[0103] Next, refer to Figure 9 The control processing flow of control system 1 will be explained.

[0104] Figure 9 This is a flowchart illustrating the control processing of control system 1.

[0105] Furthermore, the processing of steps S11-S13, step S21, and steps S22-S24 is similar to... Figure 7 The processing of steps S11-S13, S21, and S22-S24 is the same, so the explanation is omitted.

[0106] In step S14, the numerical control device 10A (shared variable definition output unit 111) outputs the shared variable definition 120 to the program editing device 30. Furthermore, the processing in step S14 can be performed in parallel with the processing in steps S11 to S13.

[0107] In step S31, the program editing device 30 (compilation unit 31) receives the shared variable definition 120 output in step S14.

[0108] In step S32, the program editing device 30 (compilation unit 31) creates a control program for the peripheral device 20 (1) that refers to the shared variable based on the shared variable definition 120 received in step S31, according to the user's input operation.

[0109] In step S33, the program editing device 30 (compilation unit 31) compiles the control program created in step S32 and outputs it to the peripheral device 20 (1).

[0110] In step S21a, peripheral device 20 (1) receives the control program output in step S33 and stores it in the control program storage unit 220 of storage unit 22.

[0111] Based on the above, the control system 1 of the second embodiment can reduce the burden on users in creating control programs when the call processing of access shared variables is not explicitly used in the creation of the control program.

[0112] In addition, even if there are additions or changes in the shared variable definition 120, the control system 1 generates a shared variable access library to transform the control program each time, so that the user does not need to manually recompile the control program.

[0113] The second embodiment has been described above.

[0114] As described above, as in the first and second embodiments, the control system 1 of this disclosure can reduce the burden on users in creating control programs without explicitly using access to shared variables during the creation of the control program.

[0115] <Variation Example>

[0116] In the first and second embodiments, the numerical control devices 10 and 10A are different from the peripheral devices 20(1) to 20(N), but are not limited thereto. For example, the numerical control devices 10 and 10A may also include the peripheral devices 20(1) to 20(N).

[0117] Furthermore, the functions included in the control system 1 in the first and second embodiments can be implemented by hardware, software, or a combination thereof. Here, implementation by software means implementation by reading and executing a program using a computer.

[0118] Programs can be stored and supplied to a computer using various types of non-transitory computer-readable media. Non-transitory computer-readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (e.g., floppy disks, magnetic tapes, hard disks), optical-magnetic recording media (e.g., optical discs), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, and semiconductor memories (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash memory ROMs, and RAM). Alternatively, programs can also be supplied to a computer using various types of transient computer-readable media. Examples of transient computer-readable media include electrical signals, optical signals, and electromagnetic waves. Transient computer-readable media can supply programs to a computer via wired or wireless communication paths such as wires and optical fibers.

[0119] Furthermore, the steps of executing a program recorded on a recording medium naturally include processes performed sequentially in time, as well as processes that are not necessarily sequential in time, and processes performed in parallel or individually. Additionally, the steps describing the program can also be implemented via cloud computing.

[0120] This disclosure has been described in detail, but it is not limited to the various embodiments described above. Various additions, substitutions, modifications, and partial deletions can be made to these embodiments without departing from the spirit of this disclosure or from the spirit of this disclosure derived from the content described in the claimed scope and its equivalents. Furthermore, these embodiments can also be implemented in combination. For example, in the embodiments described above, the order of each action and the order of each process are shown as an example and are not limited thereto. The same applies to the use of numerical values ​​or mathematical formulas in the description of the embodiments described above.

[0121] The following notes are also disclosed regarding the above-described embodiments and variations.

[0122] (Note 1)

[0123] The control system 1 includes: multiple peripheral devices 20(1) to 20(N); and a control device 10, which includes shared variables that can be shared with the multiple peripheral devices 20(1) to 20(N). The control device 10 includes: a library generation unit 110, which extracts shared variable information, including at least offset and size information, from the definition of the shared variables, and generates a shared variable access library for accessing the shared variables based on the shared variable information. The multiple peripheral devices 20(1) to 20(N) each include: a parsing unit 210, which parses reference codes for referencing shared variables from the executed control program; a conversion unit 211, which inserts a call to the shared variable access library for accessing the shared variables referenced by the reference codes at the position of the reference codes parsed by the parsing unit 210 to convert the control program; and an execution unit 212, which executes the control program converted by the conversion unit 211.

[0124] (Note 2)

[0125] Based on the control system 1 in Appendix 1, the control device 10 has: a template storage unit 122 that stores a template that pre-describes the code for accessing shared variables and can input shared variable information; and a library generation unit 110 that generates a shared variable access library by inputting the offset and size of the extracted shared variable information into the template.

[0126] (Note 3)

[0127] Based on the control system 1 in Appendix 1 or 2, the control device 10 includes a plurality of peripheral devices 20(1) to 20(N).

[0128] (Note 4)

[0129] Based on the control system 1 in Appendix 1 or 2, it has: a program editing device 30, which compiles the control programs of each of the multiple peripheral devices 20(1) to 20(N) and outputs them to the multiple peripheral devices 20(1) to 20(N) respectively; the control device 10A has: a shared variable definition output unit 111, which outputs the definition of the shared variable to the program editing device 30; the program editing device 30, based on the user's input operation, creates the control programs of each of the multiple peripheral devices 20(1) to 20(N) that refer to the shared variable according to the shared variable definition received from the control device 10A.

[0130] Symbol Explanation

[0131] 1. Control system;

[0132] 10. 10A Numerical control device;

[0133] 11, 11a Control Department;

[0134] 110 Library Generation Department;

[0135] 111 Shared variable definition output section;

[0136] 12. Storage Unit;

[0137] 120. Definition of shared variables;

[0138] 121 Shared variables;

[0139] 122 Template Storage Department;

[0140] 20(1)~20(N) Peripheral devices;

[0141] 21. Control Department;

[0142] 210 Analysis Department;

[0143] 211. Conversion Unit;

[0144] 212 Executive Department;

[0145] 22. Storage Department;

[0146] 220 Control program storage unit;

[0147] 30. Program editing device;

[0148] 31. Compilation Department.

Claims

1. A control system, characterized in that, have: Multiple peripheral devices; and The control device includes shared variables that can be shared with the plurality of peripheral devices. The control device includes a library generation unit that extracts shared variable information, including at least offset and size information, from the definition of the shared variables, and generates a shared variable access library for accessing the shared variables based on the shared variable information. The plurality of peripheral devices each have: The parsing unit parses the reference code for the shared variables from the executing control program; The conversion unit, at the location of the reference code parsed by the parsing unit, inserts a call to the shared variable access library that accesses the shared variable referenced by the reference code to convert the control program; and The execution unit executes the control program converted by the conversion unit.

2. The control system according to claim 1, characterized in that, The control device includes a template storage unit that stores templates pre-written with codes for accessing the shared variables and capable of inputting information about the shared variables. The library generation unit generates the shared variable access library by inputting the offset and size of the extracted shared variable information into the template.

3. The control system according to claim 1 or 2, characterized in that, The control device includes the plurality of peripheral devices.

4. The control system according to claim 1 or 2, characterized in that, The control system includes a program editing device, which compiles the control programs for each of the plurality of peripheral devices and outputs them to the plurality of peripheral devices respectively. The control device includes a shared variable definition output unit, which outputs the definition of the shared variable to the program editing device. The program editing device, based on user input and according to the shared variable definition received from the control device, creates the control program for each of the plurality of peripheral devices, referencing the shared variable.

Citation Information

Patent Citations

  • Control system, control device, terminal device, and program

    JP2020064399A