Control system, information processing device, and recording medium
By pre-matching columns and members in the control system, the problem of long matching time between tables and structures was solved, and the efficiency of writing data to the database was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- OMRON CORP
- Filing Date
- 2020-02-14
- Publication Date
- 2026-05-05
AI Technical Summary
In control devices and information processing devices, the correspondence between columns in a table and members in a structure takes a long time, resulting in low efficiency in writing data to the database.
The control system pre-determines the correspondence between columns and members, obtains the number of columns and data types of the table using the acquisition unit, sets the members of the unit definition structure, determines the data type of the unit, and generates a program template to achieve fast data writing.
It enables quick mapping between columns and members, simplifies the data writing process, and improves the efficiency of database operations.
Smart Images

Figure CN116450589B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed on February 14, 2020, with application number 202080017521.1 and title "Control System, Information Processing Device and Information Processing Program". Technical Field
[0002] This disclosure relates to techniques for accessing tables on a database. Background Technology
[0003] Factory Automation (FA) systems, used to automate production processes, are becoming increasingly common in various production sites. FA systems consist of various industrial drive devices. These industrial drive devices include, for example, moving tables for moving workpieces, conveyors for transporting workpieces, and robotic arms for moving workpieces to predetermined target locations. These drive devices are controlled by industrial control devices such as PLCs (Programmable Logic Controllers) or robot controllers.
[0004] In recent years, control devices and information processing devices that can access databases from external devices have become increasingly common. Japanese Patent Application Publication No. 2016-194808 (Patent Document 1) discloses a control device that can operate multiple records at the same time with a simple mechanism in a technique of "operating databases without performing SQL descriptions".
[0005] Existing technical documents
[0006] Patent documents
[0007] Patent Document 1: Japanese Patent Application Publication No. 2016-194808 Summary of the Invention
[0008] The problem that the invention aims to solve
[0009] Furthermore, when either the control device or the information processing device writes data registered in a structure that can be used in the control program into a database table, it is necessary to establish a mapping between the columns in the table and the members in the structure. When the user performs this mapping independently using either the control device or the information processing device, it takes a considerable amount of time to complete the mapping. Therefore, a technique is needed that can easily establish the mapping between columns in a table and members in a structure.
[0010] This disclosure was made in view of the above-mentioned circumstances, and discloses a technique that enables easy mapping between columns in a table and members in a structure.
[0011] Methods for solving problems
[0012] In one example of this disclosure, the control system for controlling the controlled object includes: a database that maintains one or more tables; a control device that executes a control program and is capable of accessing the database; an acquisition unit that acquires the number of columns of the selected table constituting the one or more tables and the data type of each column; a setting unit that defines a structure containing a number of members corresponding to the number of columns acquired and usable in the control program; and a determination unit that determines the data type of each member of the structure corresponding to the data type of each column acquired.
[0013] According to this disclosure, the control system pre-maps columns to members, thus enabling easy processing that includes appending records of structures with data to a table.
[0014] In one example of this disclosure, the decision unit determines the data type of each member of the structure from among the data types that can be used in the control program.
[0015] According to this disclosure, the control system can easily match the data type of the columns in a table with the data type of the members in a suitable structure.
[0016] In one example of this disclosure, the aforementioned decision unit determines the data type of each member of the aforementioned structure according to the user's selection of one or more candidate data types.
[0017] According to this disclosure, the control system can provide users with data types of members that can be established to correspond to the data types of columns.
[0018] In one example of this disclosure, the decision unit corresponds the table name of the selected table to the attribute information of the variable used to refer to the entire structure.
[0019] According to this disclosure, the control system can provide the user with information indicating which table a structure in the user program corresponds to.
[0020] In one example of this disclosure, the aforementioned decision unit maps the member names of each member of the aforementioned structure to the column names of the aforementioned columns.
[0021] According to this disclosure, the control system is able to provide users with information that identifies members corresponding to columns.
[0022] In one example of this disclosure, the control program includes a function block for executing commands to control access to the database. In the function block, the table name and a variable used to reference the entire structure are set as independent variables.
[0023] According to this disclosure, the control system enables the control device to automatically perform processing including the definition of a structure and the determination of the data type of that structure.
[0024] In one example of this disclosure, the control system further includes a generation unit that generates a program template for performing a process of appending records consisting of values set for the aforementioned members to the corresponding table.
[0025] According to this disclosure, the control system can easily generate a user program 70 that can access the database 410 by using a program template.
[0026] In one example of this disclosure, an information processing device is also included, which assists in the development of a control program executed by the control device. The information processing device includes the acquisition unit, the setting unit, and the decision unit.
[0027] According to this disclosure, the control system pre-maps columns to members, thus enabling easy processing that includes appending records of structures with data to a table.
[0028] In one example of this disclosure, an information processing apparatus that assists in the development of a control program executed by a control device includes: an acquisition unit that acquires the number of columns of a selected table and the data type of each column in one or more tables held in a database accessible by the control device; a setting unit that defines a structure that contains a number of members corresponding to the number of columns acquired and can be used in the control program; and a determination unit that determines the data type of each member of the structure in accordance with the acquired data type of each column.
[0029] According to this disclosure, the information processing apparatus pre-defines the correspondence between columns and members, thus enabling easy processing, which includes appending records of structures containing data to a table.
[0030] In one example of this disclosure, the information processing program of the information processing apparatus that assists in the development of the control program executed by the control device causes the information processing apparatus to perform the following steps: obtaining the number of columns of a selected table and the data type of each column in one or more tables held by the database that constitutes the control device; defining a structure that contains a number of members corresponding to the number of columns obtained above and that can be used in the control program; and determining the data type of each member of the structure corresponding to the data type of each column obtained above.
[0031] According to this disclosure, the information processing procedure pre-defines the correspondence between columns and members, thus enabling easy processing, which includes appending records of structures containing data to the table.
[0032] The effects of the invention
[0033] According to this disclosure, it is easy to map columns in a table to members in a structure. Attached Figure Description
[0034] Figure 1 This is a diagram illustrating the structure of a control system.
[0035] Figure 2 It is a diagram showing the hardware structure of an information processing device.
[0036] Figure 3 This is an example of a screen used to select a category for a database.
[0037] Figure 4 This is an example of a screen used to accept table selections in a database.
[0038] Figure 5 This is a screenshot showing an example of a screen used to select the data type of a structure.
[0039] Figure 6 This is a diagram representing a display structure's data type for user confirmation.
[0040] Figure 7 This is a diagram showing an example of a screen used to select generated items, including structures.
[0041] Figure 8 This is a diagram showing an example of a screen that displays the generated structures and variables for the user to confirm.
[0042] Figure 9 This is a diagram representing an example of a functional block contained in a user program.
[0043] Figure 10 This is a diagram illustrating an example of a user program that contains function blocks.
[0044] Figure 11 This is a diagram illustrating an example of appending a record to a table.
[0045] Figure 12 This is a schematic diagram illustrating an example of the hardware structure of a control device.
[0046] Figure 13 It is a block diagram representing the hardware structure of an external device.
[0047] Figure 14 It is a flowchart illustrating the processing steps of the control system.
[0048] Figure 15 This is a flowchart illustrating the processing steps of an information processing device before its use.
[0049] Figure 16 This is a flowchart illustrating the processing steps of an information processing device before its use.
[0050] Figure 17 This is a diagram illustrating an example of the structure of the control system in the second embodiment.
[0051] Figure 18 This is a diagram illustrating an example of the structure of the control system in the third embodiment.
[0052] Figure 19 This is a diagram representing an example of a functional block contained in a user program.
[0053] Figure 20 This is a diagram illustrating an example of a user program that contains function blocks.
[0054] Label Explanation
[0055] 1, 1a, 1b: Control system; 30: Development auxiliary program; 40: Data type correspondence table; 60: Template; 61: First program template; 62: Second program template; 70: User program; 80: System program; 100: Information processing device; 100a: First information processing device; 100b: Second information processing device; 102: Control unit; 104, 206, 304: Main memory; 108, 208, 308: Storage device; 110: Acquisition module; 112, 201, 312 114, 316: Communication interface; 116, 314: Display interface; 120: Setting module; 122, 322: Display unit; 124, 324: Operation unit; 130: Decision module; 140: Generation module; 150: Member; 151: First member; 152: Second member; 153: Third member; 154: Fourth member; 200: Control device; 202, 302: Processor; 204: Chipset; 222: Internal bus controller; 224: Fieldbus controller Controller; 226: I / O unit; 239: Memory card interface; 240: Memory card; 255A, 255B, 255C, 257A, 257B, 257C, 257D: Input unit; 256A, 256B, 256C, 256D, 258A, 258B, 258C, 258D: Output unit; 280A, 280B: Servo driver; 300: External device; 325: Internal bus; 410: Database; 420: Table; 450: Column; 451: Column 1; 4 52: Column 2; 453: Column 3; 454: Column 4; 461, 462: Records; 510: Database selection screen; 511: Table selection screen; 512: Data type selection screen; 513: Data type confirmation screen; 514: Item selection screen; 515: Item confirmation screen; 540: Next screen button; 542: Previous screen button; 544: Finish button; 558: Selection bar; 572: Structure; 574: Variable; FB1, FB2: Function blocks. Detailed Implementation
[0056] Embodiments of the present invention will be described in detail with reference to the accompanying drawings. Furthermore, identical or corresponding parts in the drawings will be labeled with the same reference numerals and their descriptions will not be repeated.
[0057] <Application Examples>
[0058] Reference Figure 1 This section describes application examples of the present invention. Figure 1This is a diagram illustrating an example of the structure of control system 1. Control system 1 is, for example, a FA system used to automate production processes. Control system 1 includes an information processing unit 100, a control unit 200, and an external device 300. The information processing unit 100, the control unit 200, and the external device 300 are connected to a first network. The first network uses a network suitable for information system networks such as Ethernet (registered trademark).
[0059] The control device 200 can access the database 410 (described later) in the external device 300. Hereinafter, the database is also referred to as DB. Additionally, the control device 200 is connected to a drive unit (not shown) located in the field via a second network. The control device 200 communicates with the drive unit at constant intervals. The second network may employ EtherCAT, EtherNet / IP, CompoNet, etc.
[0060] External device 300 is a DBMS (Database Management System) with database functionality. External device 300 is, for example, a laptop or desktop PC or a server. More specifically, external device 300 has a database 410. Database 410 maintains one or more tables 420. Table 420 contains one or more columns representing columns and one or more records representing rows. The data type corresponding to the type of data stored is set in each column.
[0061] Information processing device 100 is, for example, a laptop or desktop PC (Personal Computer), tablet terminal, smartphone, or a device capable of developing control programs for control device 200. The control program can be installed on control device 200 as a user program (e.g., user program 70 described later). Hereinafter, the control program will also be referred to as a user program (UPG). Information processing device 100 can access database 410 in external device 300. Information processing device 100 includes storage device 108, acquisition module 110, setting module 120, decision module 130, and generation module 140. Storage device 108 includes development aid 30 and data type mapping table 40.
[0062] The development assistance program 30 is a program used to develop a control program for the auxiliary control device 200. When the development assistance program 30 stored in the storage device 108 is read and executed, the information processing device 100 can perform the functions of the acquisition module 110, the setting module 120, the decision module 130, and the generation module 140.
[0063] Data type mapping table 40 is a list showing the correspondence between the data types of the columns in table 420 of database 410 and the data types of the members in the structure of user program 70. A structure stores a collection of data in a specific form. Therefore, a structure can also be considered a data group that can be processed as a unit. A structure can contain interrelated members in a definitive manner.
[0064] The acquisition module 110 acquires information from one or more tables 420 maintained by the database 410, specifically from tables 420 selected by a user operation received by the information processing device 100. The information in table 420 includes the number of columns constituting the table 420 and the data type of each column. For example, the acquisition module 110 acquires "4" as the number of columns in table 1. The number of columns "4" is the sum of columns 1 (451), 2 (452), 3 (453), and 4 (454) in table 1. Hereinafter, one or more columns will also be collectively referred to as column 450.
[0065] The acquisition module 110 acquires the data type of column 450 (e.g., columns 1 through 454). More specifically, the acquisition module 110 acquires "decimal(1)" which is set as the data type of column 1 451. The acquisition module 110 acquires "decimal(5)" which is set as the data type of column 2 452. The acquisition module 110 acquires "nchar(19)" which is set as the data type of column 3 453. The acquisition module 110 acquires "TimeSTAMP" which is set as the data type of column 4 454. "decimal" is a data type that handles fixed-point numbers. "nchar" is a data type that is a fixed-length string. "TimeSTAMP" is a data type that is a time stamp with six attributes: year, month, day, hour, minute, and second.
[0066] The setting module 120 defines a structure corresponding to the number of columns 450 obtained by the acquisition module 110. This structure can be used in the user program 70 and contains a number of members corresponding to the number of columns. More specifically, the setting module 120 defines a structure containing a number of members "4" corresponding to the number of columns "4". For example, the setting module 120 defines a first structure containing a first member 151, a second member 152, a third member 153, and a fourth member 154. Hereinafter, one or more members will also be collectively referred to as member 150.
[0067] The decision module 130 determines the data type of each member 150 of the structure in correspondence with the data type of each column 450 obtained by the acquisition module 110. More specifically, the decision module 130 determines the data type of each member 150 in correspondence with the data type of each column 450 based on the data type correspondence table 40. The decision module 130 determines "bool" as the data type of the first member 151 corresponding to the data type "decimal(1)" in the first column 451. The decision module 130 determines "Int" as the data type of the second member 152 corresponding to the data type "decimal(5)" in the second column 452. The decision module 130 determines "String(20)" as the data type of the fourth member 154 corresponding to the data type "nchar(19)" in the third column 453 and the data type "TimeSTAMP" in the fourth column 454. Thus, the control system 1 can easily perform the correspondence between the columns 450 in table 420 and the members 150 of the structure.
[0068] The generation module 140 generates a user program 70 and sends the generated user program 70 to the control device 200. The control device 200 registers data to each member 150 constituting the structure. As an example, the user program 70 is a program for performing the process of appending the records of the structure with the registered data to table 420 of the database 410. Since the control system 1 has pre-defined the correspondence between columns 450 and members 150, it can easily perform the process, which includes appending the records of the structure with the registered data to table 420.
[0069] <First Implementation>
[0070] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the following description, the same reference numerals are used to denote the same parts. Their names and functions are also the same. Therefore, detailed descriptions of them will not be repeated.
[0071] [A. Hardware structure of information processing device 100]
[0072] Figure 2 This is a diagram showing the hardware structure of the information processing device 100. (Refer to...) Figure 2 The information processing device 100 includes a control unit 102, a main memory 104, a storage device 108, a communication interface 112, a display interface 114, and an I / O interface 116.
[0073] The control unit 102 reads the development assistance program 30 stored in the storage device 108 and expands the development assistance program 30 into the main memory 104. The control unit 102 functions as the acquisition module 110, the setting module 120, the decision module 130, and the generation module 140. Furthermore, the following describes a structural example of implementing the required processing by executing the development assistance program 30 through the control unit 102; however, dedicated hardware circuitry (such as ASICs or FPGAs) can also be used to install some or all of these provided processes.
[0074] Storage device 108 includes development aid 30, data type mapping table 40, template 60, and user program 70. When generation module 140 generates user program 70, template 60 is used as a prototype. A specific example of generation module 140 using template 60 to generate user program will be described later.
[0075] The communication interface 112 exchanges data with other communication devices, for example, via a first network. Other communication devices include, for example, a control device 200, an external device 300, etc. The information processing device 100 may also be configured to download various programs, such as development support programs 30, from other communication devices via the communication interface 112.
[0076] The display interface 114 is electrically connected to the display unit 122 and sends image signals for displaying images to the display unit 122 according to instructions from the control unit 102, etc. The display unit 122 is composed of LCD (Liquid Crystal Display), organic EL (Electro Luminescence) display, etc., and provides various information to the user. The display unit 122 can display various screens provided by the information processing device 100 (for example, the database selection screen 510 described later (see reference)). Figure 3 )).exist Figure 2 In the example shown, the information processing device 100 and the display unit 122 are shown as separate units, but the information processing device 100 and the display unit 122 can also be configured as a single unit.
[0077] I / O interface 116 is electrically connected to operation unit 124 and receives signals indicating user operations from operation unit 124. Operation unit 124 typically consists of keyboard, mouse, touch panel, touchpad, etc., and accepts user operations.
[0078] [B. Example of a screen for setting up the mapping between column 450 and member 150]
[0079] Next, use Figures 3-8An example of a screen setting for mapping columns 450 in database 410 to members 150 in user program 70 will be described. This setting is executed by the information processing device 100 receiving user input from the operation unit 124.
[0080] [b1. Database selection screen 510]
[0081] Figure 3 This is a diagram illustrating an example of a screen used for selecting a category in database 410. (See reference...) Figure 3 The display unit 122 displays a database selection screen 510 that includes items such as database type, IP address, instance name, service name, username and password, as well as a next screen button 540 and a previous screen button 542.
[0082] Information processing device 100, for example, accepts the selection of database 410 by a user using operation unit 124. The type of database 410 is, for example, "Oracle Database," "MySQL," and "SQLite." The type of database is not limited to these; it can also be other types of databases.
[0083] The information processing device 100 accepts input of other information, including database categories. Then, when a user selects the next screen button 540 through operation of the operation unit 124, the information processing device 100 will... Figure 4 The table selection screen 511 shown is displayed on the display unit 122. Furthermore, when the user selects the previous screen button 542 using the operation unit 124, the information processing device 100 displays the screen that was displayed on the display unit 122 immediately before the database selection screen 510 was displayed.
[0084] [b2. Table Selection Screen 511]
[0085] Figure 4 This is a diagram illustrating an example of a screen used to select table 420 in database 410. (See reference...) Figure 4 The display unit 122 displays a table selection screen 511 that includes items such as DB connection service settings, DB connection settings, and DB tables, as well as a next screen button 540 and a previous screen button 542. The information processing device 100, for example, accepts a user's selection of table 420 using the operation unit 124. Afterwards, when the user selects the next screen button 540 using the operation unit 124, the information processing device 100 will... Figure 5 The data type selection screen 512 is displayed on the display unit 122. Furthermore, when the user selects the previous screen button 542 using the operation unit 124, the information processing device 100 displays the screen that was displayed on the display unit 122 immediately before the display table selection screen 511.
[0086] [b3. Data Type Selection Screen 512]
[0087] Figure 5 This is a screenshot showing an example of a screen used to select the data type of a structure. (See reference...) Figure 5 The display unit 122 displays a data type selection screen 512 containing the column names of the first table, DB data types, and UPG data types, as well as a next screen button 540 and a previous screen button 542. The first table is the table selected in the aforementioned table selection screen 511. The column names are the attribute information of each column 450, which is the information contained in the table 420. The column names are, for example, information that can identify each column 450, such as "DATA1" to "DATA4". The DB data type is the data type set in each column 450. The UPG data type is the data type of each member 150 corresponding to the data type of each column 450. This correspondence is based on the data type correspondence table 40.
[0088] Information processing device 100, for example, receives a user's selection of UPG data type using operation unit 124. More specifically, decision module 130 of information processing device 100 determines the data type of each member 150 of the structure based on the user's selection of one or more candidates for data type displayed in selection bar 558 using operation unit 124. Thus, control system 1 can provide the user with data types of member 150 that can correspond to the data type of bar 450.
[0089] Furthermore, the DB data type information included in the data type selection screen 512 is based on the number of columns 450 obtained by the acquisition module 110 from table 420 of database 410 and the data type information of each column 450. Additionally, the column name information included in the data type selection screen 512 is attribute information obtained by the acquisition module 110 from table 420 of database 410. Moreover, the UPG data type information included in the data type selection screen 512 is determined by the setting module 120 and the determining module 130. The setting module 120 defines a structure containing a number of members 150 corresponding to the number of columns 450 obtained by the acquisition module 110. The determining module 130 determines the data type of each member 150 of the structure in correspondence with the data type of each column 450 obtained by the acquisition module 110. This correspondence is based on the data type correspondence table 40. Thus, the determining module 130 determines the data type of each member 150 of the structure from the data types that can be used in the user program 70. Therefore, the control system 1 can easily match the data type of column 450 in table 420 with the data type of member 150 in the appropriate structure.
[0090] When the information processing device 100 selects the next screen button 540 through user operation using the operation unit 124, it will... Figure 6 The data type confirmation screen 513 is displayed on the display unit 122. Furthermore, when the user selects the previous screen button 542 using the operation unit 124, the information processing device 100 displays the screen that was displayed on the display unit 122 immediately before the data type selection screen 512 was displayed.
[0091] [b4. Data type confirmation screen 513]
[0092] Figure 6 This is a diagram illustrating a display structure's data type for user confirmation. (See reference.) Figure 6 The display unit 122 displays a data type confirmation screen 513 containing the member names of Table 1, UPG data type items, and a next screen button 540 and a previous screen button 542. The display unit 122 also displays the UPG data type of each member 150 selected by the user using the operation unit 124 in the data type selection screen 512. Furthermore, the display unit 122 displays information identical to the column names displayed in the data type selection screen 512 (e.g., “DATA1” to “DATA4”) as the member names of each member 150. More specifically, the decision module 130 registers the column names, which are attribute information of each column 450, as member names, which are attribute information of the member 150. In this way, the decision module 130 establishes a correspondence between the member names of each member 150 of the structure and the column names of each column 450. Therefore, the control system 1 can provide the user with information that allows identification of the member 150 corresponding to the column 450.
[0093] When the user selects the next screen button 540 through operation of the operation unit 124, the information processing device 100 will... Figure 7 The generated item selection screen 514 is displayed on the display unit 122. Furthermore, when the user selects the previous screen button 542 using the operation unit 124, the information processing device 100 displays the screen that was displayed on the display unit 122 immediately before the data type confirmation screen 513 was displayed.
[0094] [b5. Generate Project Selection Screen 514]
[0095] Figure 7 This is a screenshot showing an example of a screen used to select a generated item containing a structure. (See reference...) Figure 7The display unit 122 displays a generated item selection screen 514, which includes items such as structure 572, variable 574, UPG 576, Insert 578, and Select 580, as well as a next screen button 540 and a previous screen button 542. The generation module 140 of the information processing device 100 generates data corresponding to the items selected by the user through the operation unit 124. Figure 7 As shown, we assume that structure 572, variable 574, UPG 576, and Insert 578 are selected for illustration. The following explanation assumes that Insert 578 is selected, but if Select 580 is also selected, the data corresponding to that item will be generated. Furthermore, if both Insert 578 and Select 580 are selected, the data corresponding to those items will be generated.
[0096] When the user selects the next screen button 540 through operation of the operation unit 124, the information processing device 100 will... Figure 8 The generated information confirmation screen 515 is displayed on the display unit 122. Furthermore, when the user selects the previous screen button 542 using the operation unit 124, the information processing device 100 displays the screen that was displayed on the display unit 122 immediately before the generated item selection screen 514.
[0097] [b6. Generate information confirmation screen 515]
[0098] Figure 8 This is a diagram illustrating a screen example showing the generated structures and variables for user confirmation. For example, display unit 122 displays the member names and UPG data types of the structures in Table 1, as well as the variable names and attribute information of the variables. More specifically, as the member names of the structures, display unit 122 displays the names and attributes of the variables listed in Table 1. Figure 6 The member names corresponding to the column names described in the text ("DATA1~DATA4"). Additionally, as in... Figure 5 The display unit 122 displays the data type of each member 150, corresponding to the DB data type as described in the description. For example, the display unit 122 displays "bool" on the first member 151, "Int" on the second member 152, "String(20)" on the third member 153, and "DATE_AND_TIME" on the fourth member 154.
[0099] In addition, display unit 122 displays the variable name "InsertVal1" and attribute information "Table1" as variables. The variable name represents the variable name of the entire structure. This variable name can be set to any value. The attribute information represents Table 420 corresponding to the entire structure. Figure 8 The structure shown, containing each member 150, corresponds to each column 450 of Table 1. Therefore, the information for "Table 1" is registered in the attribute information. The attribute information is determined by the decision module 130 of the information processing device 100. More specifically, the decision module 130 will... Figure 4 The description explains that the table name of table 420 selected by the user operation using operation unit 124 is used as the attribute information of the variable used to refer to the entire structure. Thus, control system 1 can provide the user with information indicating which table 420 corresponds to the structure in user program 70. Then, generation module 140 generates data containing the variable name and the attribute information.
[0100] When the user selects the completion button 544 using the operation unit 124, the information processing device 100 ends. Figure 8 The generated information confirmation screen 515 is displayed as shown. Furthermore, when the user selects the previous screen button 542 using the operation unit 124, the information processing device 100 displays the screen that was displayed on the display unit 122 immediately before the generated information confirmation screen 515 was displayed.
[0101] [C. Structure and Processing Content of User Program 70]
[0102] Next, refer to Figures 9-11 The structure and processing content of user program 70 are described below. User program 70 is based on the above... Figures 3-6 The number of columns 450 in Table 1 and the settings of members 150 in the structure corresponding to the data type. The generation module 140 selects... Figure 7 The user program 70 is generated using UPG 576 and Insert 578.
[0103] Figure 9 This is a diagram representing an example of function block FB1 contained in user program 70. Hereinafter, function block FB1 will also be referred to as block FB1.
[0104] A program with the functionality of block FB1 can also be defined in ways other than function blocks. For example, block FB1 can also contain blocks defined by ladder diagrams, command lists, structured text, and any one or a combination of sequential function charts. Furthermore, block FB1 can also contain blocks defined in general-purpose programming languages such as JavaScript (registered trademark) or C.
[0105] Block FB1 is a program used to execute commands that control access to database 410. More specifically, block FB1 is a program that defines data types and appends records of structures containing data that meet the conditions of those data types to table 420 of database 410.
[0106] Block FB1 includes input sections 255A to 255C for accepting and recording additional settings, and output sections 256A to 256D for outputting additional information related to recording.
[0107] The input unit 255A, designated as "Execute," accepts settings indicating whether to perform record appending processing. For example, input unit 255A is configured to accept "BOOL" type input. If "FALSE" is entered into input unit 255A, record appending processing is not performed. Conversely, if "TRUE" is entered into input unit 255A, record appending processing is performed.
[0108] The input section 255B, designated "DBConnection", accepts the connection result obtained from executing the function block for connecting to the database 410. This connection result contains information for accessing the database 410 (e.g., the database name).
[0109] The input section 255C, designated as "MappingVariableList", accepts input of variables from a structure. The input section 255C is specified to accept predefined structures.
[0110] When the appending process of a record is completed normally, a signal indicating normal completion is output from output unit 256A, which is labeled "Done". During the appending process, a signal indicating that the generation process is in progress is output from output unit 256B, which is labeled "Busy". If the appending process does not generate a record normally, a signal indicating abnormal completion is output from output unit 256C, which is labeled "Error". In this case, an error ID for identifying erroneous content is also output from output unit 256D, which is labeled "ErrorID".
[0111] Figure 10 This is a diagram illustrating an example of a user program 70 containing function block FB1. The information processing device 100 uses a template 60 stored in the storage device 108 to generate... Figure 10This is a portion of the user program 70 shown. For example, template 60 includes input elements IN0 to IN4, block FB1, and output element OUT1. For example, the variables for input elements IN0 to IN4 and output element OUT1 in template 60 are initially blank, but are assigned variables after template 60 is selected. Hereinafter, template 60 with assigned variables will be referred to as a program template. The program template includes the first program template 61 and the second program template 62, which will be described later. Furthermore, block FB1 is equivalent to... Figure 9 The functional blocks described in the text.
[0112] Program template 61 contains input elements IN0 to IN4. Variables are assigned to input elements IN0 to IN4, and their values vary depending on the assigned variables. More specifically, the variable "SettingTrigger" is assigned to input element IN0. The variable "SettingTrigger" is of type BOOL and its initial value is "False" (= OFF). The value of the variable "SettingTrigger" changes to "True" (ON), for example, based on the activation of control device 200. In other cases, the value of the variable "SettingTrigger" is "False" (OFF).
[0113] Variables “val1” to “val4” are assigned to the input elements IN1 to IN4. These variables include, for example, process values obtained by the control device 200 performing calculations based on field values. Field values are values obtained from the drive device where the control device 200 is installed in the field via the second network. Through the input elements IN1 to IN4, the values of each variable “val1” to “val4” are set to “InsertVal[0]” to “InsertVal[3]”. “InsertVal[0]” to “InsertVal[3]” are values based on the variable “InsertVal” representing the entire structure, and are set in members 151 to 454.
[0114] When process values are set for each member 150 of the structure by inputting elements IN1 to IN4, the record consisting of each member 150 of the structure is appended to table 420 by block FB1.
[0115] The variable "Done" is assigned to the output element OUT1. Furthermore, output element OUT1 corresponds to the output "Done" of block FB1. As a result, the value of output element OUT1 varies based on the value of the output "Done" of block FB1.
[0116] Figure 11This diagram illustrates an example of appending a record to Table 420. Each column 450 (column 1 451 to column 454) in Table 420 has attribute information "DATA1" to "DATA4". Furthermore, record 461 is assigned a process value corresponding to the data type of each column 450. Then, the record 462 in the structure is appended to Table 420 using the first program template 61 generated by the generation module 140. In record 462 of the structure, the data type corresponding to the data type of each column in Table 420 is set to each member 150 (member 151 to member 154). Record 462 is also assigned a process value corresponding to the data type of each member 150. Record 462 is appended to Table 420 by executing the first program template 61, which has assigned variables to template 60.
[0117] Thus, the generation module 140 generates a first program template 61 based on template 60. This first program template 61 is used to perform the process of appending records consisting of the values (process values) set by each member 150 in the structure to the corresponding table 420. This first program template 61 is a program generated based on template 60, in which blank variables are assigned. By using the program template, the control system 1 can easily generate a user program 70 that can access the database 410.
[0118] [D. Hardware Structure]
[0119] [d1. Hardware structure of control device 200]
[0120] Next, refer to Figure 12 This describes the hardware structure of the control device 200. Figure 12 This is a schematic diagram illustrating an example of the hardware structure of the control device 200.
[0121] The control device 200 includes a communication interface 201, a processor such as a CPU or MPU 202, a chipset 204, a main memory 206, a non-volatile storage device 208, an internal bus controller 222, a fieldbus controller 224, and a memory card interface 239.
[0122] The processor 202 reads the control program, including the user program 70 and the system program 80, stored in the storage device 208 and executes it in the main memory 206. By executing the control program, the processor 202 achieves arbitrary control of servo drives 280A and 280B, etc. The control program contains various programs for controlling the control device 200. The system program 80, included in the control program, contains command codes for providing basic functions of the control device 200, such as data input / output processing and timing control. The user program 70 is downloaded from the aforementioned information processing device 100. The user program 70 is arbitrarily designed according to the controlled object and executes sequence control.
[0123] The chipset 204 controls the various components to achieve the overall processing of the control device 200.
[0124] In addition to the control program, the storage device 208 also stores various types of data. For example, the storage device 208 stores the aforementioned data type correspondence table 40, etc.
[0125] The internal bus controller 222 is an interface for exchanging data with various devices connected to the control device 200 via the internal bus. An example of such a device is an I / O unit 226. The fieldbus controller 224 is an interface for exchanging data with various drive devices connected to the control device 200 via the fieldbus. An example of such a device is the aforementioned servo drives 280A and 280B. Additionally, drive devices such as vision sensors (not shown) can also be connected.
[0126] The internal bus controller 222 and the fieldbus controller 224 can assign arbitrary instructions to the connected devices and acquire arbitrary data managed by the devices. In addition, the internal bus controller 222 and / or the fieldbus controller 224 also function as interfaces for exchanging data with the servo drives 280A and 280B.
[0127] The communication interface 201 controls various data exchanges via wired / wireless networks. The control device 200 communicates with the information processing device 100 or the external device 300 via the communication interface 201. In addition, the control device 200 can access the database 410 on the external device 300 via the communication interface 201.
[0128] The memory card interface 239 is configured to be able to load and unload a memory card 240 (e.g., an SD card) as an external storage medium, and to write data to and read data from the memory card 240.
[0129] [d2. Hardware structure of external device 300]
[0130] Next, refer to Figure 13 This describes the hardware structure of the external device 300. Figure 13 This is a block diagram representing the hardware structure of the external device 300.
[0131] External device 300 has a hardware structure with a general-purpose architecture. That is, external device 300 is installed as a personal computer. However, it is also possible to install external device 300 using dedicated hardware instead of general-purpose hardware.
[0132] More specifically, the external device 300 includes a processor 302 such as a CPU or MPU, a main memory 304, a non-volatile storage device 308, a communication interface 312, an I / O interface 314, and a display interface 316. These components are connected to each other via an internal bus 325 in a manner that enables data communication.
[0133] The processor 302 reads the control program (not shown) stored in the storage device 308 and executes it in the main memory 304, thereby controlling the external device 300. That is, the processor 302, in cooperation with the main memory 304 and the storage device 308, realizes the control unit that performs control operations.
[0134] The communication interface 312, I / O interface 314, and display interface 316 mediate the data exchange between the external device 300 and other communication devices.
[0135] More specifically, communication interface 312 pairs Figure 1 The communication with the control device 200 is mediated via a first network or the like. The communication interface 312 may, for example, be a component capable of Ethernet-compliant communication.
[0136] I / O interface 314 is connected to operation unit 324, receiving signals from operation unit 324 indicating user operations. Operation unit 324 typically comprises a keyboard, mouse, touch panel, touchpad, etc., and handles user operations. Display interface 316 is connected to display unit 322, sending image signals for displaying images to display unit 322 according to instructions from processor 302, etc. Display unit 322 comprises an LCD, OLED display, etc., and displays various information to the user. Figure 13 In the example, the external device 300 and the display unit 322 are shown as separate units, but the external device 300 and the display unit 322 can also be configured as a single unit.
[0137] [E. Control Processing Steps]
[0138] [e1. Processing steps in control system 1]
[0139] Figure 14 This is a flowchart illustrating the processing steps of control system 1. (Refer to...) Figure 14 The data flow between the information processing device 100, the control device 200, and the external device 300 is described. In step S10, it is assumed that the information processing device 100 receives a start command. Based on this, the information processing device 100 executes the development assistance program 30 after startup, thereby displaying the database selection screen 510 on the display unit 122.
[0140] In step S15, it is assumed that the information processing device 100 has accepted a selection operation for database 410 in the database selection screen 510. Based on this, the information processing device 100 sends a retrieval command for table 420 stored in the selected database 410 to the external device 300 via the control device 200. The external device 300 outputs the information of table 420 to the information processing device 100 via the control device 200. Based on the information of table 420 sent from the external device 300, the information processing device 100 displays the table selection screen 511 on the display unit 122.
[0141] In step S20, it is assumed that the information processing device 100 has accepted a selection operation for table 420 in the table selection screen 511. Based on this, the information processing device 100 outputs a command to the external device 300 via the control device 200 to retrieve information from the column 450 contained in the selected table 420. The external device 300 outputs the information from the column 450 to the information processing device 100 via the control device 200. Based on the information from the column 450 sent from the external device 300, the information processing device 100 displays a data type selection screen 512 on the display unit 122.
[0142] In step S25, it is assumed that the information processing device 100 has accepted the selection operation of the UPG data type in the data type selection screen 512. Based on this, the information processing device 100 displays the data type confirmation screen 513 on the display unit 122.
[0143] In step S30, it is assumed that the information processing device 100 has accepted the UPG data type confirmation operation in the data type confirmation screen 513. Based on this, the information processing device 100 displays the generation item selection screen 514 on the display unit 122.
[0144] In step S35, it is assumed that the information processing device 100 has accepted the selection operation of the generated item in the generated item selection screen 514. Based on this, the information processing device 100 displays the generated information confirmation screen 515 on the display unit 122.
[0145] In step S40, it is assumed that the information processing device 100 has accepted the confirmation of the generated information in the generated information confirmation screen 515. Based on this, the information processing device 100 generates a user program 70 containing the first program template 61 based on the template 60, and sends the generated user program 70 to the information processing device.
[0146] Steps S10, S15, S20, S25, S30, S35, and S40 described so far are the processes before using the control device 200. Next, the processes after using the control device 200 will be described.
[0147] In step S45, control device 200 begins processing user program 70. Control device 200 executes the first program template 61 included in user program 70, appending a record to table 420 of database 410 of external device 300. This record is composed of the members 150 of the structure of control device 200. External device 300, for example, sends a response to control device 200 indicating that the record appending process has been successful.
[0148] [e2. Processing steps in information processing device 100]
[0149] Use the above Figure 14 The pre-operation processing of the control device 200 in the described processing steps is, for example, the processing performed by the information processing device 100. Figure 15 as well as Figure 16 This is a flowchart explaining the processing steps in the case of pre-application processing of the information processing device 100. (Refer to...) Figure 15 In step S105, the information processing device 100 is started by accepting a start command through user operation of the operation unit 124.
[0150] In step S110, after the information processing device 100 is started, it executes the development assistance program 30, thereby displaying the database selection screen 510 on the display unit 122.
[0151] In step S115, the information processing device 100 determines whether the selection operation of database 410 in the database selection screen 510 has been accepted. If the information processing device 100 determines that the selection operation of database 410 has been accepted ("Yes" in step S115), the information processing device 100 switches control to step S120. Otherwise ("No" in step S115), the information processing device 100 switches control to step S125.
[0152] In step S120, the information processing device 100 displays a table selection screen 511 on the display unit 122 based on the information of the table 420 sent from the external device 300.
[0153] In step S125, the information processing device 100 uses a timer (not shown) to measure the elapsed time since the moment it was determined whether the selection operation of the database 410 was accepted. If the timeout occurs after a predetermined period (e.g., 1 minute) (yes in step S125), the information processing device 100 terminates the processing of this flowchart. Otherwise (no in step S125), the information processing device 100 repeatedly executes the control of step S115.
[0154] In step S130, the information processing device 100 determines whether the selection operation of table 420 in the database selection screen 510 has been accepted. If the information processing device 100 determines that the selection operation of table 420 has been accepted ("Yes" in step S130), the information processing device 100 switches control to step S135. Otherwise ("No" in step S130), the information processing device 100 switches control to step S140.
[0155] In step S135, the information processing device 100 displays a data type selection screen 512 on the display unit 122 based on the information in column 450 sent from the external device 300.
[0156] In step S140, the information processing device 100 uses a timer (not shown) to measure the elapsed time since the moment it was determined whether the selection operation in Table 420 was accepted. If the timeout occurs after a predetermined period (e.g., 1 minute) (yes in step S140), the information processing device 100 terminates the processing of this flowchart. Otherwise (no in step S140), the information processing device 100 repeatedly executes the control of step S130.
[0157] In step S145, the information processing device 100 determines whether the selection operation of the UPG data type in the data type selection screen 512 has been accepted. If the information processing device 100 determines that the data type selection operation has been accepted ("Yes" in step S145), the information processing device 100 switches control to step S150. Otherwise ("No" in step S145), the information processing device 100 switches control to step S155.
[0158] In step S150, the information processing device 100 displays a data type confirmation screen 513 on the display unit 122.
[0159] In step S155, the information processing device 100 uses a timer (not shown) to measure the time elapsed since the moment it was determined whether a data type selection operation was accepted. If the timeout occurs after a predetermined period (e.g., 1 minute) (yes in step S155), the information processing device 100 terminates the processing of this flowchart. Otherwise (no in step S155), the information processing device 100 repeatedly executes the control of step S145.
[0160] Next, refer to Figure 16 In step S160, the information processing device 100 determines whether the confirmation operation for the UPG data type in the data type confirmation screen 513 has been accepted. If the information processing device 100 determines that the confirmation operation for the UPG data type has been accepted ("Yes" in step S160), the control is switched to step S165. Otherwise ("No" in step S160), the information processing device 100 switches the control to step S170.
[0161] In step S165, the information processing device 100 displays a generation item selection screen 514 on the display unit 122.
[0162] In step S170, the information processing device 100 uses a timer (not shown) to measure the elapsed time since the moment it was determined whether a confirmation operation for the UPG data type was accepted. If the timeout occurs after a predetermined period (e.g., 1 minute) ("Yes" in step S170), the information processing device 100 terminates the processing of this flowchart. Otherwise ("No" in step S170), the information processing device 100 repeatedly executes the control of step S160.
[0163] In step S175, the information processing device 100 determines whether the selection operation for a generated item in the generated item selection screen 514 has been accepted. If the information processing device 100 determines that the selection operation for a generated item has been accepted ("Yes" in step S175), the information processing device 100 switches control to step S180. Otherwise ("No" in step S175), the information processing device 100 switches control to step S185.
[0164] In step S180, the information processing device 100 displays the generated information confirmation screen 515 on the display unit 122.
[0165] In step S185, the information processing device 100 uses a timer (not shown) to measure the time elapsed since the moment it was determined whether the selection operation for generating an item was accepted. If the timeout occurs after a predetermined period (e.g., 1 minute) (yes in step S185), the information processing device 100 terminates the processing of this flowchart. Otherwise (no in step S185), the information processing device 100 repeatedly executes the control of step S175.
[0166] In step S190, the information processing device 100 determines whether the confirmation operation for generating information in the information confirmation screen 515 has been accepted. If the information processing device 100 determines that the confirmation operation for generating information has been accepted ("Yes" in step S190), it switches control to step S195. Otherwise ("No" in step S190), the information processing device 100 switches control to step S200.
[0167] In step S195, the information processing device 100 generates, for example, a user program 70 containing the first program template 61.
[0168] In step S200, the information processing device 100 uses a timer (not shown) to measure the elapsed time since the moment it was determined whether the confirmation of the generated information was accepted. If the timeout occurs after a predetermined period (e.g., 1 minute) (yes in step S200), the information processing device 100 terminates the processing of this flowchart. Otherwise (no in step S200), the information processing device 100 repeatedly executes the control of step S190.
[0169] In step S205, the information processing device 100 sends the generated user program 70 to the control device 200.
[0170] <Second Implementation Method>
[0171] The second embodiment of this disclosure will now be described. A portion of the hardware structure included in the control system 1a of the second embodiment differs from the structure included in the control system 1 of the first embodiment described above; however, the rest is implemented using the same hardware structure. Furthermore, the processing implemented by the structure included in the control system 1a of the second embodiment performs the same processing as that implemented by the structure included in the information processing apparatus 100 of the first embodiment, except for a portion that differs from that implemented by the structure included in the information processing apparatus 100 of the first embodiment. Hereinafter, reference will be made to… Figure 17 Regarding the hardware structure and processing of the control system 1, the same content will not be repeated, but the content of different structures and processing will be described.
[0172] Figure 17This is a diagram illustrating a structural example of the control system 1a in the second embodiment. In the first embodiment described above, the control system 1 includes an information processing device 100 that acquires information from Table 420 (the number of columns and the data type). Furthermore, it is explained that after determining the number and data type of the members 150 of the structure, the information processing device 100 outputs the generated user program 70 to the control device 200. That is, the information processing device 100 has the functions of an acquisition module 110, a setting module 120, a determination module 130, and a generation module 140. Then, it is explained how the information processing device 100 performs processing using these functions. In contrast, in... Figure 17 In the second embodiment shown, the multiple information processing devices 100 included in the control system 1a perform processing using the functions described above.
[0173] The control system 1a includes a first information processing device 100a and a second information processing device 100b. The first information processing device 100a has the functions of an acquisition module 110, a setting module 120, and a decision module 130. The second information processing device 100b has a generation module 140. The acquisition module 110 of the first information processing device 100a acquires information from Table 420. After determining the number and data type of the members 150 of the structure, the setting module 120 and the decision module 130 of the first information processing device 100a export information containing the number and data type of the members 150. The first information processing device 100a outputs the above information, for example, in a file of a predetermined data format. The predetermined data format is, for example, (Comma Separated Values) format.
[0174] The generation module 140 of the second information processing device 100b generates a user program 70. The generated user program 70 is then imported into the control device 200.
[0175] Thus, the control system 1a is composed of an information processing device 100 having the functions of some of the modules and another information processing device 100 having the functions of the other modules. Therefore, the control system 1a can easily add functions to modules using multiple information processing devices 100.
[0176] <Third Implementation Method>
[0177] The third embodiment of this disclosure will now be described. A portion of the hardware structure of the control system 1b of the third embodiment differs from that of the control system 1 of the first embodiment, but the rest is implemented using the same hardware structure. Furthermore, the processing implemented by the structure of the control system 1b of the third embodiment performs the same processing as that implemented by the structure of the information processing apparatus 100 of the first embodiment, except for a portion that differs from that implemented by the structure of the information processing apparatus 100 of the first embodiment. Hereinafter, reference will be made to… Figure 18 Regarding the hardware structure and processing of the control system 1, the same content will not be repeated, but the content of different structures and processing will be described.
[0178] Figure 18 This diagram illustrates a structural example of the control system 1b in the third embodiment. In the first embodiment described above, the information processing unit 100 included in the control system 1 acquires information from Table 420 (the number of columns and the data type). Furthermore, it is explained that after determining the number and data type of the structure members, the information processing unit 100 outputs the generated user program 70 to the control unit 200. That is, the information processing unit 100 has the functions of an acquisition module 110, a setting module 120, a determination module 130, and a generation module 140. Then, it is explained how the information processing unit 100 performs processing using these functions. In contrast, in the third embodiment, the control unit 200 included in the control system 1b has the functions of an acquisition module 110, a setting module 120, a determination module 130, and a generation module 140. The control unit 200 performs processing using the functions of these modules.
[0179] The acquisition module 110 of the control device 200 acquires information from table 420 (number of columns and data type). Then, after the setting module 120 defines the members 150 of the structure, the determination module 130 determines the data type of the structure. The generation module 140 executes the generated user program 70, etc., within the control device 200.
[0180] Furthermore, in the first embodiment, the development assistance program 30 was executed on the information processing device 100, thereby enabling the execution of the functions of each module through user operation of the operation unit 124. In contrast, the development assistance program 30 is not stored in the storage device 208 of the control device 200. The control device 200 automatically executes the functions of each module without accepting user operation. Thus, from now on, using... Figure 19 as well as Figure 20 The user program 70 used by the control device 200 to automatically execute the functions of each module is described.
[0181] Figure 19This is a diagram representing an example of function block FB2 contained in user program 70. Hereinafter, function block FB2 will also be referred to as block FB2.
[0182] A program with block FB2 functionality can also be defined in ways other than function blocks. For example, block FB2 can contain blocks defined by ladder diagrams, command lists, structured text, and any one or a combination of sequential function diagrams. Furthermore, block FB2 can also contain blocks defined in general-purpose programming languages such as JavaScript or C.
[0183] Block FB2 is a program used to execute commands that control access to database 410. More specifically, program block FB2 is a program that retrieves table information from table 420 and, after defining the members 150 of the structure, determines the data type of the structure.
[0184] Block FB2 includes input sections 257A to 257D for accepting and recording additional settings, and output sections 258A to 258D for outputting additional information related to recording.
[0185] The input section 257A, labeled "Excute", accepts settings for specifying whether to perform append processing of records.
[0186] The input section 257B, designated "DBConnection", accepts the connection result obtained from executing the function block for connecting to the database 410. This connection result contains information for accessing the database 410 (e.g., the database name).
[0187] The input unit 257C, designated as "TableName", accepts the setting of the table name. For example, the input unit 257C is configured to accept variables of type "DWORD".
[0188] The input section 257D, designated as "MappingVariableList", accepts input of variables from a structure. Input section 257D is specified to accept predefined structures.
[0189] In the input section 257C of block FB2, the table name of table 420 (e.g., "Table1") is set as an independent variable, and in the input section 257D, a variable used for referencing the entire structure (e.g., InsertVal1) is set as an independent variable. Thus, the control system 1b enables the control device 200 to automatically execute processing that includes the definition of the structure and the determination of its data type.
[0190] When the appending process of the record is completed normally, a signal indicating normal completion is output from output unit 258A, which is indicated as "Done". During the appending process, a signal indicating that the generation process is in progress is output from output unit 258B, which is indicated as "Busy". If the appending process does not generate records normally, a signal indicating abnormal completion is output from output unit 258C, which is indicated as "Error". In this case, an error ID for identifying erroneous content is also output from output unit 258D, which is indicated as "ErrorID".
[0191] Figure 20 This is a diagram illustrating an example of a user program 70 containing function block FB2. The control device 200 uses the template 60 stored in the storage device 108 to generate... Figure 10 This is a portion of the user program 70 shown. For example, template 60 includes input elements IN0-IN4, block FB1 and block FB2, and output element OUT1. For example, the variables for input elements IN0-IN4 and output element OUT1 in template 60 are initially blank, and are assigned variables after template 60 is selected. Furthermore, block FB1 is equivalent to... Figure 9 The functional blocks described in the text.
[0192] The functions of input elements IN0~IN4, block FB1, and output element OUT1 are the same as described above. Figure 10 The functions described herein are the same. Variables are assigned to the input elements IN0 to IN4 contained in the second program template 62, and these values vary according to the assigned variables. As described above, in block FB2, the table name of table 420 and the variable used for referencing the entire structure are set as independent variables. The control device 200 automatically performs processing, including the definition of the structure and the determination of the data type of the structure, through the function of block FB2.
[0193] <Variation Example>
[0194] In embodiments 1 to 3, the following methods are used: Figures 3-8 The items displayed on each screen are explained. In contrast, the items displayed on each screen are just examples; other items can also be displayed to process selections for that specific item.
[0195] In the first to third embodiments, each input and output unit provided in the function block was described. In contrast, the input and output units described are examples, and other input and output units may also be provided in the function block.
[0196] In the second embodiment, the first information processing device 100a has the functions of an acquisition module 110, a setting module 120, and a decision module 130. The case where the second information processing device 100b has a generation module 140 has also been described. In contrast, the functions of the modules in each information processing device 100 are just one example; each information processing device 100 can have the functions of any module. Furthermore, the information processing device 100 may also have modules with functions different from those described above.
[0197] <Postscript>
[0198] As described above, this embodiment includes the following disclosures.
[0199] [Structure 1]
[0200] A control system (1) for controlling a controlled object, the control system (1) having:
[0201] A database (410) that maintains one or more tables (420);
[0202] The control device (200) executes a control program (70) and is able to access the database (410);
[0203] The acquisition unit (110) acquires the number of columns (450) of the selected table (420) constituting the one or more tables (420) and the data type of each column (450);
[0204] The setting unit (120) defines a structure that contains a number of members (150) corresponding to the number of columns (450) obtained, and that can be used in the control program (70); and
[0205] The decision unit (130) determines the data type of each member (150) of the structure in correspondence with the data type of each column (450) obtained.
[0206] [Structure 2]
[0207] In the control system described in Structure 1,
[0208] The decision unit (130) determines the data type of each member (150) of the structure from the data types that can be used in the control program (70).
[0209] [Structure 3]
[0210] In the control system described in structure 1 or 2
[0211] The decision unit (130) determines the data type of each member (150) of the structure according to the user's selection of one or more candidate data types.
[0212] [Structure 4]
[0213] In the control system described in any of structures 1 to 3,
[0214] The decision unit (130) assigns the table name of the selected table (420) as the attribute information of the variable used to refer to the entire structure.
[0215] [Structure 5]
[0216] In any of the control systems described in structures 1 to 4,
[0217] The decision unit (130) associates the member names of each member (150) of the structure with the column names of each column (450).
[0218] [Structure 6]
[0219] In any of the control systems described in structures 1 to 5,
[0220] The control program (70) includes function blocks for executing commands that control access to the database (410).
[0221] In the function block, the table name of the table (420) and the variable used to refer to the entire structure are set as independent variables.
[0222] [Structure 7]
[0223] In any of the control systems described in structures 1 to 6,
[0224] The control system also has a generation unit (140) that generates program templates (61, 62) for performing a process of appending records consisting of values set for each member (150) to the corresponding table (420).
[0225] [Structure 8]
[0226] In any of the control systems described in structures 1 to 7,
[0227] The control system also includes an information processing unit (100) that assists in the development of a control program (70) executed by the control unit (200).
[0228] The information processing device (100) includes the acquisition unit (110), the setting unit (120), and the decision unit (130).
[0229] [Structure 9]
[0230] An information processing apparatus (100) that assists in the development of a control program (70) executed by a control device (200), the information processing apparatus (100) having:
[0231] The acquisition unit (110) acquires the number of columns (450) of the selected table (70) in one or more tables (70) held by the database (70) that constitutes the control device (200) and the data type of each column (450).
[0232] The setting unit (120) defines a structure that contains a number of members (150) corresponding to the number of columns (450) obtained, and that can be used in the control program (70); and
[0233] The decision unit (130) determines the data type of each member (150) of the structure in correspondence with the data type of each column (450) obtained.
[0234] [Structure 10]
[0235] An information processing program is provided for an information processing device (100) that assists in the development of a control program (70) executed by a control device (200), the information processing program causing the information processing device (100) to perform the following steps:
[0236] Step (S20): Obtain the number of columns (450) of the selected table (420) in one or more tables (420) held by the database (70) that constitutes the control device (200) and the data type of each column (450);
[0237] Step (S25) defines a structure that contains a number of members (150) corresponding to the number of columns (450) obtained, and that can be used in the control program (70); and
[0238] Step (S30) determines the data type of each member (150) of the structure in accordance with the data type of each column (450) obtained.
[0239] The embodiments disclosed herein should be considered illustrative rather than restrictive in all respects. The scope of the invention is defined not by the foregoing description but by the claims, and is intended to include all modifications equivalent to and within the scope of the claims.
Claims
1. A control system for automating production processes and controlling controlled objects, the control system having: A database that maintains one or more tables; Control device, which is capable of accessing the database; and An information processing device that assists in the development of user programs executed by the control device. The user program includes any one of ladder diagrams, command lists, structured text, and sequential function charts, or a combination thereof. The information processing device has: The obtaining unit obtains the column name and data type of each column of the selected table that constitutes the one or more tables; A decision unit, which determines the data type of each member that can be used in the user program, corresponding to the data type of each column obtained; The first display unit displays a screen containing the column name and data type of each column, as well as the data type of each member corresponding to the data type of each column; The second display unit displays items from multiple generated projects and shows a screen for accepting item selections based on user actions; and The generation department generates a generated item corresponding to the selected item, which is part of the user program, based on the process values obtained by performing calculations on the determined data types of each member and the on-site values based on the production site.
2. The control system according to claim 1, wherein, The decision unit determines the data type of each member from the data types that can be used in the user program.
3. The control system according to claim 1, wherein, The decision unit determines the data type of each member based on a list of correspondences between the data types of the display column and the data types of the members.
4. The control system according to any one of claims 1 to 3, wherein, The decision-making unit determines the data type of each member according to the user's operation.
5. The control system according to any one of claims 1 to 3, wherein, The user program includes a first function block, which is used to execute commands that control access to the database. In the first function block, the variable corresponding to the object column is set as the independent variable.
6. The control system according to any one of claims 1 to 3, wherein, The user program includes a second function block, which enables data of the data type corresponding to the data type of each column to be saved to the control device.
7. An information processing apparatus that automates production processes and assists in the development of user programs executed by a control device, said user programs comprising any one or a combination of ladder diagrams, command lists, structured text, and sequential function charts, wherein the information processing apparatus has: The acquisition unit acquires the column names and data types of each column of the selected table in one or more tables maintained by the database that constitutes the control device. A decision unit, which determines the data type of each member that can be used in the user program, corresponding to the data type of each column obtained; The first display unit displays a screen containing the column name and data type of each column, as well as the data type of each member corresponding to the data type of each column; The second display unit displays items from multiple generated projects and shows a screen for accepting item selections based on user actions; and The generation department generates a generated item corresponding to the selected item, which is part of the user program, based on the process values obtained by performing calculations on the determined data types of each member and the on-site values based on the production site.
8. A recording medium storing an information processing program executed by an information processing device, the information processing device automating production processes and assisting in the development of a user program executed by a control device, the user program comprising any one or a combination of ladder diagrams, command lists, structured text, and sequential function charts, wherein the information processing program causes the information processing device to perform the following steps: Obtain the column names and data types of each column of the selected table in one or more tables maintained by the database that constitutes the control device; The data type of each member that can be used in the user program is determined in correspondence with the data type of each column obtained; The screen displays the column name and data type of each column, as well as the data type of each member corresponding to the data type of each column; Displays items from multiple generated projects, and shows a screen for accepting item selections based on user actions; and Based on the determined data types of each member and the process values obtained by performing calculations based on the on-site values of the production site, a generated project corresponding to the selected project is generated as part of the user program.
Citation Information
Patent Citations
Programmable logic controller, data collection device, database access method and database access program
JP2016194808A
Code generation method and apparatus
CN106293664A
Class-file generation method, apparatus, electronic device, and storage medium
CN109375910A