WO2020184061A1 - 制御システム、情報処理装置、および情報処理プログラム - Google Patents

制御システム、情報処理装置、および情報処理プログラム Download PDF

Info

Publication number
WO2020184061A1
WO2020184061A1 PCT/JP2020/005789 JP2020005789W WO2020184061A1 WO 2020184061 A1 WO2020184061 A1 WO 2020184061A1 JP 2020005789 W JP2020005789 W JP 2020005789W WO 2020184061 A1 WO2020184061 A1 WO 2020184061A1
Authority
WO
WIPO (PCT)
Prior art keywords
information processing
data type
control
program
column
Prior art date
Application number
PCT/JP2020/005789
Other languages
English (en)
French (fr)
Inventor
智成 乾
弘太郎 岡村
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Priority to EP23170673.0A priority Critical patent/EP4224333A1/en
Priority to EP20769408.4A priority patent/EP3937024A4/en
Priority to CN202080017521.1A priority patent/CN113518981A/zh
Priority to CN202310457195.1A priority patent/CN116450589A/zh
Priority to US17/434,836 priority patent/US20220147010A1/en
Publication of WO2020184061A1 publication Critical patent/WO2020184061A1/ja
Priority to US17/837,268 priority patent/US20220299968A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • This disclosure relates to technology for accessing tables on a database.
  • FA Vectory Automation
  • the FA system is composed of various industrial drive devices.
  • Industrial drive equipment includes, for example, a moving table for moving the work, a conveyor for transporting the work, an arm robot for moving the work to a predetermined destination, and the like. These drive devices are controlled by industrial control devices such as PLCs (Programmable Logic Controllers) and robot controllers.
  • PLCs Programmable Logic Controllers
  • robot controllers Robot Controllers
  • Patent Document 1 discloses a control device capable of "manipulating a plurality of records collectively by a simple mechanism in a technique for operating a database without a description of SQL". There is.
  • This disclosure has been devised in view of the actual situation, and discloses a technique that can easily associate a column in a table with a member in a structure.
  • a control system that controls a controlled object includes a database that holds one or more tables, a control device that executes a control program and can access the database, and the one or more tables.
  • a structure that can be used in the control program including an acquisition means for acquiring the number of columns constituting the selected table and the data type of each column, and a number of members corresponding to the number of acquired columns. It is provided with a setting means for defining and a determining means for determining the data type of each member of the structure in association with the acquired data type of each column.
  • control system since the control system associates the columns with the members in advance, it is possible to easily perform the process including adding the record of the structure in which the data is registered to the table.
  • the determination means determines the data type of each member of the structure from the data types available in the control program.
  • control system can easily associate the data types of the members in the structure suitable for the data types of the columns in the table.
  • the determination means determines the data type of each member of the structure according to the user's selection of one or more candidates for the data type.
  • control system can provide the user with a member data type that can be associated with the column data type.
  • the determination means associates the table name of the selected table with the attribute information of the variable for referencing the entire structure.
  • control system can provide the user with information indicating which table the structure in the user program is associated with.
  • the determination means associates the member name of each member of the structure with the column name of each column.
  • control system can provide the user with information that can identify the member associated with the column.
  • control program includes a function block for executing an instruction for controlling access to the database, and the function block refers to the table name of the table and the entire structure. Variables for each are set as arguments.
  • control system can cause the control device to automatically execute a process including the definition of the structure and the determination of the data type of the structure.
  • control system further includes a generation unit that generates a program template for executing a process of adding a record consisting of the values set in each of the above members to the corresponding table.
  • control system can easily generate a user program 70 that can access the database 410 by using the program template.
  • an information processing device that supports the development of a control program executed by the control device is further provided, and the information processing device includes the acquisition means, the setting means, and the determination means.
  • control system since the control system associates the columns with the members in advance, it is possible to easily perform the process including adding the record of the structure in which the data is registered to the table.
  • an information processing device that supports the development of a control program executed by a control device constitutes a table selected from one or a plurality of tables held by a database accessible to the control device.
  • An acquisition means for acquiring the number of columns and the data type of each column, a setting means for defining a structure that can be used in the control program, including a number of members corresponding to the number of acquired columns, and the acquisition. It is provided with a determination means for determining the data type of each member of the above structure in association with the data type of each column.
  • the information processing apparatus associates the columns with the members in advance, it is possible to easily perform the process including adding the record of the structure in which the data is registered to the table.
  • the information processing program of the information processing device that supports the development of the control program executed by the control device is held in the information processing device by the database in which the control device can access.
  • the control program which includes a step of acquiring the number of columns constituting the selected table among one or a plurality of tables and the data type of each column, and a number of members corresponding to the number of acquired columns.
  • the step of defining the available structure and the step of determining the data type of each member of the structure in association with the acquired data type of each column are executed.
  • the information processing program associates the columns with the members in advance, it is possible to easily perform the process including adding the record of the structure in which the data is registered to the table.
  • FIG. 1 is a diagram illustrating a configuration example of the control system 1.
  • the control system 1 is, for example, an FA system for automating a production process.
  • the control system 1 includes an information processing device 100, a control device 200, and an external device 300.
  • the information processing device 100, the control device 200, and the external device 300 are connected to the first network.
  • As the first network a network suitable for an information system network such as Ethernet (registered trademark) is used.
  • the control device 200 can access the database 410 described later in the external device 300.
  • the database will also be referred to as DB.
  • the control device 200 is connected to a drive device (not shown) provided in the field by a second network.
  • the control device 200 performs constant periodic communication with the drive device.
  • EtherCAT registered trademark
  • EtherNet / IP registered trademark
  • CompoNet registered trademark
  • the external device 300 is a DBMS (Database Management System) having a database function.
  • the external device 300 is, for example, a notebook type or desktop type PC or server. More specifically, the external device 300 has a database 410.
  • Database 410 holds one or more tables 420.
  • Table 420 includes one or more columns showing columns and one or more records showing rows. A data type is set for each column according to the type of data to be stored.
  • the information processing device 100 is, for example, a device capable of developing a control program for a notebook type or desktop type PC (Personal Computer), a tablet terminal, a smartphone, or a control device 200.
  • the control program can be installed in the control device 200 as a user program (for example, a user program 70 described later).
  • the control program is also referred to as a user program (UPG).
  • the information processing device 100 can access the database 410 in the external device 300.
  • the information processing device 100 includes a storage device 108, an acquisition module 110, a setting module 120, a determination module 130, and a generation module 140.
  • the storage device 108 includes a development support program 30 and a data type correspondence table 40.
  • the development support program 30 is a program for supporting the development of a control program for the control device 200.
  • the information processing device 100 can execute the functions of the acquisition module 110, the setting module 120, the determination module 130, and the generation module 140.
  • the data type correspondence table 40 is a list showing the correspondence between the column data types in the table 420 of the database 410 and the member data types in the structure in the user program 70.
  • a structure is a collection of data stored in a certain format. Therefore, it can be said that the structure is a data group that can be treated as one unit. Structures can identifiablely include members associated with each other.
  • the acquisition module 110 acquires the information of the table 420 selected by the user operation received by the information processing apparatus 100 from the one or a plurality of tables 420 stored in the database 410.
  • the information in table 420 includes the number of columns that make up the table 420 and the data type of each column.
  • the acquisition module 110 acquires "4" as the number of columns in the first table, for example.
  • the number of columns "4" is the total number of the first column 451 and the second column 452, the third column 453, and the fourth column 454 in the first table. In the following, one or more columns are collectively referred to as column 450.
  • the acquisition module 110 acquires the data type of the column 450 (for example, the first column 451 to the fourth column 454). More specifically, the acquisition module 110 acquires "decimal (1)” set as the data type of the first column 451. The acquisition module 110 acquires “decimal (5)” set as the data type of the second column 452. The acquisition module 110 acquires "nchar (19)” set as the data type of the third column 453. The acquisition module 110 acquires "TimeSTAMP” set as the data type of the fourth column 454. "Decimal” is a data type that handles fixed-point numbers. "Nchar” is a data type of a fixed-length character string. “TimeSTAMP” is a time stamp data type having six attributes of year, month, day, hour, minute and second.
  • the setting module 120 defines a structure corresponding to the number of columns 450 acquired by the acquisition module 110.
  • the structure is available 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 including members of the number "4" corresponding to the number "4" of columns.
  • the setting module 120 defines, for example, a first structure including a first member 151, a second member 152, a third member 153, and a fourth member 154.
  • one or more members are collectively referred to as a member 150.
  • the determination module 130 determines the data type of each member 150 of the structure in association with the data type of each column 450 acquired by the acquisition module 110. More specifically, the determination module 130 determines the data type of each member 150 in association with the data type of each column 450 based on the data type correspondence table 40. The determination module 130 determines "bool” as the data type of the first member 151 corresponding to the data type "decimal (1)” of the first column 451. The determination module 130 determines "Int” as the data type of the second member 152 corresponding to the data type "decimal (5)” of the second column 452. The determination module 130 determines "String (20)” as the data type of the third member 153 corresponding to the data type "nchar (19)" of the third column 453.
  • the determination module 130 determines "DATE_AND_TIME" as the data type of the fourth member 154 corresponding to the data type "TimeSTAMP" of the fourth column 454. As a result, the control system 1 can easily associate the column 450 in the table 420 with the member 150 in the structure.
  • the generation module 140 generates the user program 70 and transmits the generated user program 70 to the control device 200.
  • the control device 200 registers data in each member 150 constituting the structure.
  • the user program 70 is a program for executing a process of adding a record of a structure in which the data is registered to the table 420 of the database 410. Since the column 450 and the member 150 are associated with each other in advance, the control system 1 can easily perform a process including adding a record of a structure in which data is registered to the table 420.
  • FIG. 2 is a diagram showing a hardware configuration of the information processing device 100.
  • 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.
  • the control unit 102 reads out the development support program 30 stored in the storage device 108 and expands the development support program 30 in the main memory 104.
  • the control unit 102 functions as an acquisition module 110, a setting module 120, a determination module 130, and a generation module 140.
  • a configuration example in which necessary processing is realized by executing the development support program 30 by the control unit 102 will be described, but a part or all of the provided processing may be performed by a dedicated hardware circuit (for example,). , ASIC, FPGA, etc.) may be used for mounting.
  • the storage device 108 includes a development support program 30, a data type correspondence table 40, a template 60, and a user program 70.
  • the template 60 is used as a template when the generation module 140 generates the user program 70. A specific example in which the generation module 140 generates a user program using the template 60 will be described later.
  • the communication interface 112 exchanges data with other communication devices, for example, via the first network.
  • Other communication devices include, for example, a control device 200, an external device 300, and the like.
  • the information processing device 100 may be configured so that various programs such as the development support program 30 can be downloaded from other communication devices via the communication interface 112.
  • the display interface 114 is electrically connected to the display unit 122, and sends an image signal for displaying an image to the display unit 122 in accordance with a command from the control unit 102 or the like.
  • the display unit 122 includes an LCD (Liquid Crystal Display), an organic EL (Electro Luminescence) display, and the like, and presents various information to the user.
  • Various screens provided by the information processing apparatus 100 for example, a database selection screen 510 (see FIG. 3) described later
  • the information processing device 100 and the display unit 122 are shown as separate bodies, but the information processing device 100 and the display unit 122 may be integrally configured.
  • the I / O interface 116 is electrically connected to the operation unit 124 and takes in a signal indicating a user operation from the operation unit 124.
  • the operation unit 124 typically includes a keyboard, a mouse, a touch panel, a touch pad, and the like, and accepts operations from the user.
  • FIG. 3 is a diagram showing an example of a screen for accepting selection of the type of database 410.
  • the display unit 122 displays a database selection screen 510 including items such as a database type, IP address, instance name, service name, user name, and password, and a next screen button 540 and a previous screen button 542. indicate.
  • the information processing device 100 accepts, for example, the selection of the database 410 by the user using the operation unit 124.
  • the types of the database 410 are, for example, "Oracle Database”, “MySQL”, “SQLite” and the like.
  • the type of database is not limited to these, and may be another type of database.
  • the information processing device 100 accepts input of other information including the database type. After that, when the next screen button 540 is selected by the user operation using the operation unit 124, the information processing device 100 displays the table selection screen 511 shown in FIG. 4 on the display unit 122. When the front screen button 542 is selected by the user operation using the operation unit 124, the information processing device 100 displays the screen displayed on the display unit 122 immediately before the database selection screen 510 is displayed. ..
  • FIG. 4 is a diagram showing an example of a screen for accepting selection of table 420 in database 410.
  • the display unit 122 displays a table selection screen 511 including items such as a DB connection service setting, a DB connection setting, and a DB table, and a next screen button 540 and a previous screen button 542.
  • the information processing device 100 accepts, for example, the selection of the table 420 by the user using the operation unit 124. After that, when the next screen button 540 is selected by the user operation using the operation unit 124, the information processing device 100 displays the data type selection screen 512 shown in FIG. 5 on the display unit 122.
  • the front screen button 542 is selected by the user operation using the operation unit 124, the information processing device 100 displays the screen displayed on the display unit 122 immediately before the table selection screen 511 is displayed. ..
  • FIG. 5 is a diagram showing a screen example for accepting the selection of the data type of the structure.
  • the display unit 122 displays a data type selection screen 512 including column names, DB data type and UPG data type items of the first table, and a next screen button 540 and a previous screen button 542. Displayed at 122.
  • the first table is the table selected on the above-mentioned table selection screen 511.
  • the column name is the attribute information of each column 450 and is the information included in the table 420.
  • the column name is information that can identify each column 450, for example, "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 associated with the data type of each column 450. The association is performed based on the data type correspondence table 40.
  • the information processing device 100 accepts, for example, the user's selection of the UPG data type using the operation unit 124. More specifically, the determination module 130 of the information processing apparatus 100 follows each member 150 of the structure according to the user's selection using the operation unit 124 for one or more candidates of the data type displayed in the selection field 558. Determine the data type of. As a result, the control system 1 can provide the user with the data type of the member 150 that can be associated with the data type of the column 450.
  • the DB data type information included in the data type selection screen 512 is information based on the number of columns 450 acquired by the acquisition module 110 from the table 420 of the database 410 and the data type of each column 450. Further, the column name information included in the data type selection screen 512 is the attribute information acquired by the acquisition module 110 from the table 420 of the database 410. Further, the UPG data type information included in the data type selection screen 512 is information defined by the setting module 120 and the determination module 130.
  • the setting module 120 defines a structure including a number of members 150 corresponding to the number of columns 450 acquired by the acquisition module 110.
  • the determination module 130 determines the data type of each member 150 of the structure in association with the data type of each column 450 acquired by the acquisition module 110.
  • the association is performed based on the data type correspondence table 40.
  • the determination module 130 determines the data type of each member 150 of the structure from the data types available in the user program 70. Thereby, the control system 1 can easily associate the data type of the member 150 in the structure suitable for the data type of the column 450 in the table 420.
  • the information processing device 100 displays the data type confirmation screen 513 shown in FIG. 6 on the display unit 122.
  • the information processing device 100 displays the screen displayed on the display unit 122 immediately before the data type selection screen 512 is displayed. To do.
  • FIG. 6 is a diagram showing an example of a screen for displaying the data type of the structure for confirmation by the user.
  • the display unit 122 displays the data type confirmation screen 513 including the member name of the first table, the UPG data type item, the next screen button 540, and the previous screen button 542 on the display unit 122. ..
  • the display unit 122 displays the UPG data type of each member 150 selected by the user using the operation unit 124 on the data type selection screen 512. Further, the display unit 122 displays the same information (for example, "DATA1" to "DATA4") as the column name displayed on the data type selection screen 512 as the member name of each member 150.
  • the determination module 130 registers the column name, which is the attribute information of each column 450, as the member name, which is the attribute information of the member 150. In this way, the determination module 130 associates the member name of each member 150 of the structure with the column name of each column 450. As a result, the control system 1 can provide the user with information that can identify the member 150 associated with the column 450.
  • the information processing device 100 displays the generated item selection screen 514 shown in FIG. 7 on the display unit 122.
  • the information processing device 100 displays the screen displayed on the display unit 122 immediately before the data type confirmation screen 513 is displayed. To do.
  • FIG. 7 is a diagram showing a screen example for selecting a generated item including a structure.
  • the display unit 122 displays the generated item selection screen 514 including the items of the structure 572, the variable 574, the UPG 576, the Insert 578 and the Select 580, and the next screen button 540 and the previous screen button 542 on the display unit 122. indicate.
  • the generation module 140 of the information processing device 100 generates data corresponding to the items selected by the user operation using the operation unit 124. As shown in FIG. 7, it is assumed that the items of the structure 572, the variable 574, the UPG 576, and the Insert 578 are selected.
  • the information processing device 100 displays the generation information confirmation screen 515 shown in FIG. 8 on the display unit 122.
  • the information processing device 100 displays the screen displayed on the display unit 122 immediately before the generated item selection screen 514 is displayed. To do.
  • FIG. 8 is a diagram showing an example of a screen displaying a structure and variables generated for user confirmation.
  • the display unit 122 displays, for example, the member name and UPG data type of the structure in the first table, and the variable name and attribute information of the variable. More specifically, the display unit 122 displays the member names (“DATA1 to DATA4”) associated with the column names described in FIG. 6 as the member names of the structure. Further, the display unit 122 displays the data type of each member 150 as the UPG data type associated with the DB data type described in FIG.
  • the display unit 122 has, for example, as the data type of each member 150, "ball” for the first member 151, “Int” for the second member 152, “String (20)” for the third member 153, and “String (20)” for the fourth member 154. Display "DATE_AND_TIME”.
  • the display unit 122 displays the variable name "InsertVal1" and the attribute information "Table1" as variables.
  • the variable name is a variable name that represents the entire structure. An arbitrary value is set for the variable name.
  • the attribute information represents table 420 corresponding to the entire structure.
  • the structure including each member 150 shown in FIG. 8 corresponds to each column 450 of the first table. Therefore, the information of "Table 1" is registered in the attribute information.
  • the attribute information is determined by the determination module 130 of the information processing apparatus 100. More specifically, the determination module 130 associates the table name of the table 420 selected by the user operation using the operation unit 124 described with reference to FIG. 4 as the attribute information of the variable for referencing the entire structure.
  • the control system 1 can provide the user with information indicating which table 420 the structure in the user program 70 is associated with.
  • the generation module 140 generates data including the variable name and the attribute information.
  • the information processing device 100 ends the display of the generation information confirmation screen 515 shown in FIG.
  • the information processing device 100 displays the screen displayed on the display unit 122 immediately before the generation information confirmation screen 515 is displayed. To do.
  • the user program 70 is based on the setting of the member 150 in the structure corresponding to the number of columns 450 and the data type in the first table in FIGS. 3 to 6 described above.
  • the generation module 140 generates the user program 70 by selecting UPG 576 and Insert 578 in FIG. 7.
  • FIG. 9 is a diagram showing an example of the function block FB1 included in the user program 70.
  • the function block FB1 is also referred to as a block FB1.
  • block FB1 may be specified by other than the function block.
  • block FB1 may include those defined by a ladder diagram, instruction list, structured text, and any of the sequential function charts, or a combination thereof.
  • the block FB1 may also include those specified in a general-purpose programming language such as Javascript (registered trademark) or C language.
  • Block FB1 is a program for executing an instruction to control access to the database 410. More specifically, the block FB1 is a program having a function of adding a table 420 of the database 410 to a record of a structure in which a data type is defined and data satisfying the condition of the data type is set.
  • the block FB1 includes an input unit 255A to an input unit 255C that accepts a setting related to the addition of a record, and an output unit 256A to an output unit 256D for outputting information related to the addition of a record.
  • the input unit 255A shown as “Excute” accepts a setting for specifying whether or not to execute additional processing of records.
  • the input unit 255A is defined to accept "Boolean” type input. As long as “FALSE” is input to the input unit 255A, the additional processing of the record is not executed. On the other hand, when "TRUE” is input to the input unit 255A, the additional processing of the record is executed.
  • the input unit 255B shown as "DBConnection" receives the connection result obtained by executing the function block for connecting to the database 410.
  • the connection result includes information for accessing the database 410 (for example, the database name).
  • the input unit 255C shown as "Mapping VariableList” accepts the input of the variable of the structure.
  • the input unit 255C is defined to accept a predefined structure.
  • a signal indicating the normal end is output from the output unit 256A indicated as "Done”.
  • a signal indicating that the generation processing is in progress is output from the output unit 256B indicated as “Busy”.
  • a signal indicating an abnormal termination is output from the output unit 256C indicated as "Error”.
  • an error ID for identifying the content of the error is further output from the output unit 256D indicated as "Error ID”.
  • FIG. 10 is a diagram illustrating an example of a user program 70 including the function block FB1.
  • the information processing device 100 uses the template 60 stored in the storage device 108 to generate a part of the user program 70 shown in FIG.
  • the template 60 includes, for example, input elements IN0 to IN4, block FB1, and output element OUT1.
  • the variables of the input elements IN0 to IN4 included in the template 60 and the variables of the output element OUT1 are blank, and the variables are assigned after the template 60 is selected.
  • the template 60 to which the variables are assigned is hereinafter referred to as a program template.
  • the program template includes a first program template 61 and a second program template 62, which will be described later.
  • the block FB1 corresponds to the function block described with reference to FIG.
  • Variables "val1" to “val4" are assigned to the input elements IN1 to IN4. These variables include, for example, process values obtained by the controller 200 performing operations based on field values.
  • the field value is a value acquired by the control device 200 from the drive device provided in the field via the second network.
  • the values of the variables "val1” to “val4" are set to "InsertVal [0]” to "InsertVal [3]” by the input elements IN1 to IN4.
  • “InsertVal [0]” to “InsertVal [3]” are values based on the variable “InsertVal” representing the entire structure, and are values set in the first member 151 to the fourth member 154.
  • a variable "Done” is assigned to the output element OUT1. Further, the output element OUT1 is associated with the output "Done” of the block FB1. As a result, the value of the output element OUT1 changes according to the value of the output "Done” of the block FB1.
  • FIG. 11 is a diagram showing an example of adding a record to the table 420.
  • Each column 450 (first column 451 to fourth column 454) in the table 420 has attribute information "DATA1" to "DATA4".
  • a process value corresponding to the data type of each column 450 is set.
  • the record 462 in the structure is added to the table 420 by the first program template 61 generated by the generation module 140.
  • the data type associated with the data type of each column of the table 420 is set in each member 150 (first member 151 to fourth member 154).
  • a process value corresponding to the data type of each member 150 is set.
  • the record 462 is added to the table 420 by executing the first program template 61 in which variables are assigned to the template 60.
  • the generation module 140 uses the template 60 as the first program template 61 for executing the process of adding the record consisting of the values (process values) set to each member 150 in the structure to the corresponding table 420. Generate based on.
  • the first program template 61 is a program generated based on the template 60, and a variable that is blank in the template 60 is assigned.
  • the control system 1 can easily generate a user program 70 that can access the database 410 by using the program template.
  • FIG. 12 is a schematic view showing an example of the hardware configuration of the control device 200.
  • the control device 200 includes a communication interface 201, a processor 202 such as a CPU and an MPU, a chipset 204, a main memory 206, a non-volatile storage device 208, an internal bus controller 222, a field bus controller 224, and a memory. Includes card interface 239 and.
  • the processor 202 reads out the control program including the user program 70 and the system program 80 stored in the storage device 208, expands them in the main memory 206, and executes them.
  • the processor 202 realizes arbitrary control over the servo drivers 280A, 280B, and the like by executing the control program.
  • the control program includes various programs for controlling the control device 200.
  • the system program 80 included in the control program includes an instruction code for providing basic functions of the control device 200, such as data input / output processing and execution timing control.
  • the user program 70 is downloaded from the above-mentioned information processing device 100.
  • the user program 70 is arbitrarily designed according to the control target and executes sequence control.
  • the chipset 204 realizes the processing of the control device 200 as a whole by controlling each component.
  • the storage device 208 stores various data in addition to the control program. As an example, the storage device 208 stores the above-mentioned data type correspondence table 40 and the like.
  • the internal bus controller 222 is an interface for exchanging data with various devices connected to the control device 200 through the internal bus. As an example of such a device, an I / O unit 226 is connected.
  • the fieldbus controller 224 is an interface for exchanging data with various drive devices connected to the control device 200 through the fieldbus. As an example of such a device, the above-mentioned servo drivers 280A and 280B are connected. In addition, a drive device such as a visual sensor (not shown) may be connected.
  • the internal bus controller 222 and the fieldbus controller 224 can give arbitrary commands to the connected device and can acquire arbitrary data managed by the device.
  • the internal bus controller 222 and / or the fieldbus controller 224 also functions as an interface for exchanging data with the servo drivers 280A and 280B.
  • the communication interface 201 controls the exchange of data through various wired / wireless networks.
  • the control device 200 communicates with the information processing device 100 and the external device 300 via the communication interface 201. Further, the control device 200 can access the database 410 on the external device 300 via the communication interface 201.
  • the memory card interface 239 is configured so that a memory card 240 (for example, an SD card), which is an example of an external storage medium, can be attached and detached, and data is written to and read from the memory card 240. Is possible.
  • a memory card 240 for example, an SD card
  • FIG. 13 is a block diagram showing a hardware configuration of the external device 300.
  • the external device 300 has a hardware configuration having a general-purpose architecture. That is, the external device 300 is implemented as a kind of personal computer. However, the external device 300 may be mounted using dedicated hardware instead of general-purpose hardware.
  • 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. Including. These components are connected to each other via an internal bus 325 so as to be capable of data communication.
  • the processor 302 controls the external device 300 by reading a control program (not shown) stored in the storage device 308, expanding it in the main memory 304, and executing it. That is, the processor 302 realizes a control unit that executes control operations by linking with the main memory 304 and the storage device 308.
  • the communication interface 312, the I / O interface 314, and the display interface 316 mediate the exchange of data between the external device 300 and other communication devices.
  • the communication interface 312 mediates communication with the control device 200 via the first network or the like in FIG.
  • a component capable of communicating according to Ethernet may be adopted.
  • the I / O interface 314 is connected to the operation unit 324 and captures a signal indicating a user operation from the operation unit 324.
  • the operation unit 324 typically includes a keyboard, a mouse, a touch panel, a touch pad, and the like, and receives operations from the user.
  • the display interface 316 is connected to the display unit 322, and sends an image signal for displaying an image to the display unit 322 in accordance with a command from the processor 302 or the like.
  • the display unit 322 is composed of an LCD, an organic EL display, or the like, and presents various information to the user.
  • the external device 300 and the display unit 322 are shown as separate bodies, but the external device 300 and the display unit 322 may be integrally configured.
  • FIG. 14 is a flowchart illustrating a processing procedure of the control system 1. The flow of data between the information processing device 100, the control device 200, and the external device 300 will be described with reference to FIG. In step S10, it is assumed that the information processing apparatus 100 has received the activation command. Based on this, the information processing apparatus 100 displays the database selection screen 510 on the display unit 122 by executing the development support program 30 after the start-up.
  • step S15 it is assumed that the information processing apparatus 100 has accepted the selection operation of the database 410 on the database selection screen 510. Based on this, the information processing device 100 transmits an acquisition command of the 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 in the table 420 to the information processing device 100 via the control device 200. The information processing device 100 displays the table selection screen 511 on the display unit 122 based on the information of the table 420 transmitted from the external device 300.
  • step S20 it is assumed that the information processing apparatus 100 has accepted the selection operation of the table 420 on the table selection screen 511. Based on this, the information processing apparatus 100 outputs an acquisition command of the information of the column 450 included in the selected table 420 to the external apparatus 300 via the control apparatus 200. The external device 300 outputs the information of the column 450 to the information processing device 100 via the control device 200. The information processing device 100 displays the data type selection screen 512 on the display unit 122 based on the information of the column 450 transmitted from the external device 300.
  • step S25 it is assumed that the information processing apparatus 100 has accepted the UPG data type selection operation on the data type selection screen 512. Based on this, the information processing apparatus 100 displays the data type confirmation screen 513 on the display unit 122.
  • step S30 it is assumed that the information processing apparatus 100 has accepted the UPG data type confirmation operation on the data type confirmation screen 513. Based on this, the information processing apparatus 100 displays the generated item selection screen 514 on the display unit 122.
  • step S35 it is assumed that the information processing device 100 has accepted the operation of selecting the generated item on the generated item selection screen 514. Based on this, the information processing apparatus 100 displays the generated information confirmation screen 515 on the display unit 122.
  • step S40 it is assumed that the information processing apparatus 100 has accepted the operation of confirming the generated information on the generated information confirmation screen 515. Based on this, the information processing apparatus 100 generates a user program 70 including the first program template 61 based on the template 60, and transmits the generated user program 70 to the information processing apparatus.
  • Step S10, step S15, step S20, step S25, step S30, step S35 and step S40 described so far are processes before the control device 200 is operated. Next, the post-operation processing of the control device 200 will be described.
  • step S45 the control device 200 starts the process of the user program 70.
  • the control device 200 executes the first program template 61 included in the user program 70 to add a record to the table 420 in the database 410 of the external device 300.
  • the record is a record composed of each member 150 of the structure of the control device 200.
  • the external device 300 transmits, for example, a response indicating that the additional processing of the record is successful to the control device 200.
  • step S105 the information processing apparatus 100 receives an activation command and is activated by a user operation using the operation unit 124.
  • step S110 the information processing apparatus 100 displays the database selection screen 510 on the display unit 122 by executing the development support program 30 after the startup.
  • step S115 the information processing apparatus 100 determines whether or not the selection operation of the database 410 on the database selection screen 510 has been accepted.
  • the information processing apparatus 100 determines that the selection operation of the database 410 has been accepted (YES in step S115)
  • the information processing apparatus 100 switches the control to step S120. If not (NO in step S115), the information processing apparatus 100 switches control to step S125.
  • step S120 the information processing device 100 displays the table selection screen 511 on the display unit 122 based on the information of the table 420 transmitted from the external device 300.
  • step S125 the information processing apparatus 100 uses a timer (not shown) to measure the time elapsed from the time when it is determined whether or not the selection operation of the database 410 has been accepted.
  • a timer for example, 1 minute
  • the information processing apparatus 100 ends the process of this flowchart. If not (NO in step S125), the information processing apparatus 100 repeatedly executes the control of step S115.
  • step S130 the information processing apparatus 100 determines whether or not the selection operation of the table 420 on the database selection screen 510 has been accepted.
  • the information processing apparatus 100 determines that the selection operation of the table 420 has been accepted (YES in step S130)
  • the information processing apparatus 100 switches the control to step S135. If not (NO in step S130), the information processing apparatus 100 switches control to step S140.
  • step S135 the information processing device 100 displays the data type selection screen 512 on the display unit 122 based on the information of the column 450 transmitted from the external device 300.
  • step S140 the information processing apparatus 100 uses a timer (not shown) to measure the time elapsed from the time when it is determined whether or not the selection operation of the table 420 has been accepted.
  • a time-out occurs after a predetermined period (for example, 1 minute) (YES in step S140) (YES in step S140)
  • the information processing apparatus 100 ends the process of this flowchart. If this is not the case (NO in step S140), the information processing apparatus 100 repeatedly executes the control of step S130.
  • step S145 the information processing apparatus 100 determines whether or not the UPG data type selection operation on the data type selection screen 512 has been accepted.
  • the information processing apparatus 100 determines that the data type selection operation has been accepted (YES in step S145)
  • the information processing apparatus 100 switches the control to step S150. If not (NO in step S145), the information processing apparatus 100 switches control to step S155.
  • step S150 the information processing device 100 displays the data type confirmation screen 513 on the display unit 122.
  • step S155 the information processing apparatus 100 uses a timer (not shown) to measure the time elapsed from the time when it is determined whether or not the data type selection operation has been accepted.
  • a timer for example, 1 minute
  • the information processing apparatus 100 ends the process of this flowchart. If not (NO in step S155), the information processing apparatus 100 repeatedly executes the control of step S145.
  • step S160 the information processing apparatus 100 determines whether or not the UPG data type confirmation operation on the data type confirmation screen 513 has been accepted.
  • the information processing apparatus 100 determines that the UPG data type confirmation operation has been accepted (YES in step S160)
  • the information processing apparatus 100 switches the control to step S165. If not (NO in step S160), the information processing apparatus 100 switches control to step S170.
  • step S165 the information processing device 100 displays the generated item selection screen 514 on the display unit 122.
  • step S170 the information processing apparatus 100 uses a timer (not shown) to measure the time elapsed from the time when it is determined whether or not the UPG data type confirmation operation has been accepted.
  • a timer for example, 1 minute
  • the information processing apparatus 100 ends the process of this flowchart. If not (NO in step S170), the information processing apparatus 100 repeatedly executes the control of step S160.
  • step S175 the information processing device 100 determines whether or not the generation item selection operation on the generation item selection screen 514 has been accepted. When the information processing apparatus 100 determines that the generation item selection operation has been accepted (YES in step S175), the information processing apparatus 100 switches the control to step S180. If not (NO in step S175), the information processing apparatus 100 switches control to step S185.
  • step S180 the information processing device 100 displays the generated information confirmation screen 515 on the display unit 122.
  • step S185 the information processing apparatus 100 uses a timer (not shown) to measure the time elapsed from the time when it is determined whether or not the generation item selection operation has been accepted.
  • a timer for example, 1 minute
  • the information processing apparatus 100 ends the process of this flowchart. If not (NO in step S185), the information processing apparatus 100 repeatedly executes the control of step S175.
  • step S190 the information processing apparatus 100 determines whether or not the confirmation completion operation of the generated information on the generated information confirmation screen 515 has been accepted.
  • the information processing apparatus 100 determines that the confirmation completion operation of the generated information has been accepted (YES in step S190)
  • the information processing apparatus 100 switches the control to step S195. If not (NO in step S190), the information processing apparatus 100 switches control to step S200.
  • step S195 the information processing device 100 generates, for example, a user program 70 including the first program template 61.
  • step S200 the information processing apparatus 100 uses a timer (not shown) to measure the time elapsed from the time when it is determined whether or not the confirmation completion operation of the generated information has been accepted.
  • a timer for example, 1 minute
  • the information processing apparatus 100 ends the process of this flowchart. If not (NO in step S200), the information processing apparatus 100 repeatedly executes the control of step S190.
  • step S205 the information processing device 100 transmits the generated user program 70 to the control device 200.
  • a second embodiment according to the present disclosure will be described.
  • the configuration included in the control system 1a according to the second embodiment is different from the configuration included in the control system 1 according to the first embodiment described above in some hardware configurations, and the other hardware is the same. It is realized using the configuration. Further, the processing realized by the configuration included in the control system 1a according to the second embodiment is partially different from the processing realized by the configuration included in the information processing apparatus 100 according to the first embodiment. Other than that, the same processing is executed.
  • FIG. 17 the hardware configuration and processing of the configuration included in the control system 1 will be described with reference to different configurations and processing without repeating the same description.
  • FIG. 17 is a diagram illustrating a configuration example of the control system 1a according to the second embodiment.
  • one information processing apparatus 100 included in the control system 1 acquires the information (number of columns and data type) of the table 420. Then, the information processing apparatus 100 has been described to output the generated user program 70 to the control apparatus 200 after determining the number and data types of the members 150 of the structure. That is, one information processing device 100 has the functions of the acquisition module 110, the setting module 120, the determination module 130, and the generation module 140. Then, it has been described that one information processing apparatus 100 executes the process using the function.
  • a plurality of information processing devices 100 included in the control system 1a execute processing using the above functions.
  • 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 the acquisition module 110, the setting module 120, and the determination module 130.
  • the second information processing device 100b has a generation module 140.
  • the acquisition module 110 of the first information processing apparatus 100a acquires the information in the table 420.
  • the setting module 120 and the determination module 130 of the first information processing apparatus 100a determine the number and data types of the members 150 of the structure, and then export the information including the number and data types of the members 150.
  • the first information processing device 100a outputs, for example, the above information as a file in a predetermined data format.
  • the predetermined data format is, for example, a CSV (Comma Separated Values) format or the like.
  • the generation module 140 of the second information processing device 100b generates the user program 70.
  • the generated user program 70 is imported into the control device 200.
  • control system 1a is composed of an information processing device 100 having the function of a part of all modules and another information processing device 100 having the function of another module. As a result, the control system 1a can easily add the function of the module by using the plurality of information processing devices 100.
  • a third embodiment according to the present disclosure will be described.
  • the configuration included in the control system 1b according to the third embodiment is different from the configuration included in the control system 1 according to the first embodiment described above in some hardware configurations, and the other hardware is the same. It is realized using the configuration. Further, the processing realized by the configuration included in the control system 1b according to the third embodiment is partially different from the processing realized by the configuration included in the information processing apparatus 100 according to the first embodiment. Other than that, the same process is executed.
  • the hardware configuration and processing of the configuration included in the control system 1 will be described with reference to different configurations and processing without repeating the same description.
  • FIG. 18 is a diagram illustrating a configuration example of the control system 1b according to the third embodiment.
  • the information processing device 100 included in the control system 1 acquires the information (number of columns and data type) of the table 420. Then, the information processing apparatus 100 has been described to output the generated user program 70 to the control apparatus 200 after determining the number of members of the structure and the data type. That is, the information processing device 100 has the functions of the acquisition module 110, the setting module 120, the determination module 130, and the generation module 140. Then, it has been described that the information processing apparatus 100 executes the process using the function.
  • the control device 200 included in the control system 1b has the functions of the acquisition module 110, the setting module 120, the determination module 130, and the generation module 140. The control device 200 executes processing using these module functions.
  • the acquisition module 110 of the control device 200 acquires the information (number of columns and data type) of the table 420. Then, after the setting module 120 defines the member 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 and the like in the control device 200.
  • the information processing apparatus 100 executes the function of each module by the user operation using the operation unit 124 when the development support program 30 is executed.
  • the development support program 30 is not stored in the storage device 208 of the control device 200.
  • the control device 200 automatically executes the function of each module without accepting the user's operation.
  • the user program 70 for the control device 200 to automatically execute the function of each module will be described below with reference to FIGS. 19 and 20.
  • FIG. 19 is a diagram showing an example of the function block FB2 included in the user program 70.
  • the function block FB2 is also referred to as a block FB2.
  • the program having the function of the block FB2 may be specified by other than the function block.
  • block FB2 may include those defined by a ladder diagram, instruction list, structured text, and any of the sequential function charts, or a combination thereof.
  • the block FB2 may also include those specified by a general-purpose programming language such as Javascript or C language.
  • Block FB2 is a program for executing instructions that control access to the database 410. More specifically, the block FB2 is a program having a function of acquiring table information from the table 420, defining the member 150 of the structure, and then determining the data type of the structure.
  • the block FB2 includes an input unit 257A to an input unit 257D for receiving a setting related to the addition of a record, and an output unit 258A to an output unit 258D for outputting information related to the addition of a record.
  • the input unit 257A indicated as "Excute” accepts a setting for specifying whether or not to execute additional processing of records.
  • the input unit 257B shown as "DBConnection" receives the connection result obtained by executing the function block for connecting to the database 410.
  • the connection result includes information for accessing the database 410 (for example, the database name).
  • the input unit 257C indicated as "Table Name” accepts the setting of the table name.
  • the input unit 257C is defined to accept, for example, a "DWORD" type variable.
  • the input unit 257D shown as "Mapping VariableList” accepts the input of the variable of the structure.
  • the input unit 257D is defined to accept a predefined structure.
  • the table name of the table 420 (for example, "Table1") is set in the input unit 257C of the block FB2, and the variable (for example, InsertVal1) for referring to the entire structure is set in the input unit 257D as arguments. ..
  • the control system 1b can cause the control device 200 to automatically execute the process including the definition of the structure and the determination of the data type of the structure.
  • a signal indicating the normal end is output from the output unit 258A indicated as "Done”.
  • a signal indicating that the generation processing is in progress is output from the output unit 258B indicated as “Busy”.
  • a signal indicating an abnormal termination is output from the output unit 258C indicated as "Error”.
  • an error ID for identifying the content of the error is further output from the output unit 258D indicated as "Error ID”.
  • FIG. 20 is a diagram illustrating an example of a user program 70 including the function block FB2.
  • the control device 200 uses the template 60 stored in the storage device 108 to generate a part of the user program 70 shown in FIG.
  • the template 60 includes, for example, input elements IN0 to IN4, blocks FB1 and block FB2, and output elements OUT1.
  • the variables of the input elements IN0 to IN4 included in the template 60 and the variables of the output element OUT1 are blank, and the variables are assigned after the template 60 is selected.
  • the block FB1 corresponds to the function block described with reference to FIG.
  • the functions of the input elements IN0 to IN4, the block FB1 and the output element OUT1 are the same as the functions described with reference to FIG. Variables are assigned to the input elements IN0 to IN4 included in the second program template 62, and these values change according to the assigned variables.
  • the table name of the table 420 and the variable for referencing the entire structure are set as arguments in the block FB2.
  • the control device 200 automatically executes a process including the definition of the structure and the determination of the data type of the structure by the function of the block FB2.
  • ⁇ Modification example> In the first embodiment to the third embodiment, the items displayed on each screen have been described with reference to FIGS. 3 to 8. On the other hand, the item displayed on each screen is an example, and other items may be displayed to accept selection for the item.
  • each input unit and each output unit provided in the functional block have been described.
  • the input unit and the output unit described are examples, and an input unit and an output unit other than those described may be provided with a function block.
  • the first information processing device 100a has the functions of the acquisition module 110, the setting module 120, and the determination module 130. Further, it has been described that the second information processing apparatus 100b has the generation module 140.
  • the function of the module possessed by each information processing device 100 is an example, and each information processing device 100 may have the function of any module. Further, the information processing apparatus 100 may have a module function different from the above.
  • the present embodiment includes the following disclosure.
  • a control system (1) for controlling a controlled object A database (410) holding one or more tables (420), A control device (200) that can access the database (410) and executes the control program (70).
  • a control system including a determination means (130) for determining the data type of each member (150) of the structure in association with the data type of each acquired column (450).
  • the control program (70) includes a function block for executing an instruction for controlling access to the database (410).
  • the control system according to any one of configurations 1 to 5, wherein a table name of the table (420) and a variable for referencing the entire structure are set as arguments in the function block. ..
  • a generation unit (140) for generating a program template (61, 62) for executing a process of adding a record consisting of a value set in each member (150) to the corresponding table (420) is further provided.
  • the control system according to any one of configurations 1 to 6.
  • FIG. 8 An information processing device (100) that supports the development of a control program (70) executed by the control device (200) is further provided.
  • the information processing device (100) The control system according to any one of configurations 1 to 7, which includes the acquisition means (110), the setting means (120), and the determination means (130).
  • FIG. 9 An information processing device (100) that supports the development of a control program (70) executed by the control device (200). The number of columns (450) and each column (450) constituting the selected table (70) among one or a plurality of tables (70) held by the database (70) accessible to the control device (200). ) And the acquisition means (110) to acquire the data type of A setting means (120) that defines a structure available in the control program (70), including a number of members (150) corresponding to the number of acquired columns (450). An information processing apparatus including a determination means (130) for determining a data type of each member (150) of the structure in association with the data type of each acquired column (450).
  • FIG. 10 An information processing program of an information processing device (100) that supports the development of a control program (70) executed by the control device (200).
  • the information processing program is applied to the information processing apparatus (100).
  • the step (S20) to acquire the data type A step (S25) of defining a structure available in the control program (70), including a number of members (150) corresponding to the number of acquired columns (450).
  • An information processing program that executes a step (S30) of determining the data type of each member (150) of the structure in association with the data type of each acquired column (450).
  • 1,1a, 1b control system 30 development support 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 program, 112, 201, 312 communication interface, 114, 316 display interface, 116 , 314 I / O 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 4th member, 200 controller, 202, 302 processor, 204 chipset, 222 internal bus controller, 224 field bus controller, 226 I / O unit, 239 memory card interface, 240 memory card, 255A, 255B, 255C, 257A, 257B, 257C, 257D input unit, 256A

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Automation & Control Theory (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

制御システムは、1または複数のテーブルを保持しているデータベースと、制御プログラムを実行する、データベースにアクセス可能な制御装置とを備える。制御システムは、1または複数のテーブルのうち選択されたテーブルを構成するカラムの数および各カラムのデータ型を取得する。制御システムは、取得したカラムの数に対応する数のメンバを含む、制御プログラムにおいて利用可能な構造体を定義する。制御システムは、取得した各カラムのデータ型に対応付けて、構造体の各メンバのデータ型を決定する。

Description

制御システム、情報処理装置、および情報処理プログラム
 本開示は、データベース上のテーブルにアクセスするための技術に関する。
 様々な生産現場において、生産工程を自動化するFA(Factory Automation)システムが普及している。FAシステムは、種々の産業用の駆動機器によって構成される。産業用の駆動機器は、例えば、ワークを移動するための移動テーブルや、ワークを搬送するためのコンベアや、予め定められた目的の場所までワーク移動するためのアームロボットなどを含む。これらの駆動機器は、PLC(Programmable Logic Controller)やロボットコントローラなどの産業用の制御装置によって制御される。
 近年、外部装置のデータベースにアクセスすることができる制御装置や情報処理装置が普及している。特開2016-194808号公報(特許文献1)は、「SQLの記述なしにデータベースを操作する技術において、簡易な仕組みで、複数のレコードをまとめて操作する」ことができる制御装置を開示している。
特開2016-194808号公報
 ところで、制御装置および情報処理装置のいずれかが、制御プログラムにおいて利用可能な構造体に登録されたデータを、データベースのテーブルにアクセスする場合、テーブルにおけるカラムと構造体におけるメンバとを対応付けておく必要がある。このような対応付けを、ユーザが御装置および情報処理装置のいずれかを用いて個別に実行すると、当該対応付けを完了させるまでに多くの時間を要することがある。したがって、テーブルにおけるカラムと構造体におけるメンバとの対応付けを容易に行える技術が必要とされている。
 本開示は、係る実情に鑑み考え出されたものであり、テーブルにおけるカラムと構造体におけるメンバとの対応付けを容易に行える技術が開示される。
 本開示の一例では、制御対象を制御する制御システムは、1または複数のテーブルを保持しているデータベースと、制御プログラムを実行する、上記データベースにアクセス可能な制御装置と、上記1または複数のテーブルのうち選択されたテーブルを構成するカラムの数および各カラムのデータ型を取得する取得手段と、上記取得したカラムの数に対応する数のメンバを含む、上記制御プログラムにおいて利用可能な構造体を定義する設定手段と、上記取得した各カラムのデータ型に対応付けて、上記構造体の各メンバのデータ型を決定する決定手段とを備える。
 この開示によれば、制御システムは、カラムとメンバとの対応付けが予め行われているため、データが登録された構造体のレコードのテーブルへの追加を含む処理を容易に行える。
 本開示の一例では、記決定手段は、上記制御プログラムで利用可能なデータ型の中から上記構造体の各メンバのデータ型を決定する。
 この開示によれば、制御システムは、テーブルにおけるカラムのデータ型に適した構造体におけるメンバのデータ型を容易に対応付けられる。
 本開示の一例では、上記決定手段は、データ型の1または複数の候補に対する、ユーザによる選択に従って、上記構造体の各メンバのデータ型を決定する。
 この開示によれば、制御システムは、カラムのデータ型に対応付けることが可能なメンバのデータ型をユーザに対して提供できる。
 本開示の一例では、上記決定手段は、上記選択されたテーブルのテーブル名を、上記構造体の全体を参照するための変数の属性情報として対応付ける。
 この開示によれば、制御システムは、ユーザプログラムにおける構造体がいずれのテーブルに対応付けられたものかを示す情報をユーザに対して提供できる。
 本開示の一例では、上記決定手段は、上記構造体の各メンバのメンバ名を、上記各カラムのカラム名に対応付ける。
 この開示によれば、制御システムは、カラムに対応付けられたメンバを識別可能な情報をユーザに提供できる。
 本開示の一例では、上記制御プログラムは上記データベースへのアクセスを制御する命令を実行するためのファンクションブロックを含み、上記ファンクションブロックには、上記テーブルのテーブル名と、上記構造体の全体を参照するための変数とがそれぞれ引数として設定される。
 この開示によれば、制御システムは、構造体の定義と当該構造体のデータ型の決定とを含む処理を制御装置に自動で実行させることができる。
 本開示の一例では、制御システムは、上記各メンバに設定された値からなるレコードを、対応するテーブルに追加する処理を実行させるためのプログラムテンプレートを生成する生成部をさらに備える。
 この開示によれば、制御システムは、プログラムテンプレートを用いることで、データベース410にアクセス可能なユーザプログラム70を容易に生成できる。
 本開示の一例では、上記制御装置で実行される制御プログラムの開発を支援する情報処理装置をさらに備え、上記情報処理装置は、上記取得手段、上記設定手段および上記決定手段を含む。
 この開示によれば、制御システムは、カラムとメンバとの対応付けが予め行われているため、データが登録された構造体のレコードのテーブルへの追加を含む処理を容易に行える。
 本開示の一例では、制御装置で実行される制御プログラムの開発を支援する情報処理装置は、上記制御装置がアクセス可能なデータベースが保持している1または複数のテーブルのうち選択されたテーブルを構成するカラムの数よび各カラムのデータ型を取得する取得手段と、上記取得したカラムの数に対応する数のメンバを含む、上記制御プログラムにおいて利用可能な構造体を定義する設定手段と、上記取得した各カラムのデータ型に対応付けて、上記構造体の各メンバのデータ型を決定する決定手段とを備える。
 この開示によれば、情報処理装置は、カラムとメンバとの対応付けが予め行われているため、データが登録された構造体のレコードのテーブルへの追加を含む処理を容易に行える。
 本開示の一例では、制御装置で実行される制御プログラムの開発を支援する情報処理装置の情報処理プログラムは、上記情報処理プログラムは上記情報処理装置に、上記制御装置がアクセス可能なデータベースが保持している1または複数のテーブルのうち選択されたテーブルを構成するカラムの数よび各カラムのデータ型を取得するステップと、上記取得したカラムの数に対応する数のメンバを含む、上記制御プログラムにおいて利用可能な構造体を定義するステップと、上記取得した各カラムのデータ型に対応付けて、上記構造体の各メンバのデータ型を決定するステップとを実行させる。
 この開示によれば、情報処理プログラムは、カラムとメンバとの対応付けが予め行われているため、データが登録された構造体のレコードのテーブルへの追加を含む処理を容易に行える。
 本開示によれば、テーブルにおけるカラムと構造体におけるメンバとの対応付けを容易に行えるようになる。
制御システムの構成例について説明する図である。 情報処理装置のハードウェア構成を示す図である。 データベースの種別の選択を受け付けるための画面例を表わす図である。 データベースのテーブルの選択を受け付けるための画面例を表わす図である。 構造体のデータ型の選択を受け付けるための画面例を表わす図である。 ユーザの確認用に構造体のデータ型を表示する画面例を表わす図である。 構造体を含む生成アイテムを選択するための画面例を表わす図である。 ユーザの確認用に生成された構造体および変数を表示する画面例を表わす図である。 ユーザプログラムに含まれるファンクションブロックの一例を示す図である。 ファンクションブロックを含むユーザプログラムの一例について説明する図である。 テーブルにレコードを追加する一例を示した図である。 制御装置のハードウェア構成の一例を示す模式図である。 外部装置のハードウェア構成を示すブロック図である。 制御システムの処理手順について説明するフローチャートである。 情報処理装置が運用前の処理を行う場合の処理手順について説明するフローチャートである。 情報処理装置が運用前の処理を行う場合の処理手順について説明するフローチャートである。 第2の実施の形態における制御システムの構成例について説明する図である。 第3の実施の形態における制御システムの構成例について説明する図である。 ユーザプログラムに含まれるファンクションブロックの一例を示す図である。 ファンクションブロックを含むユーザプログラムの一例について説明する図である。
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰り返さない。
 <適用例>
 図1を参照して、本発明の適用例について説明する。図1は、制御システム1の構成例について説明する図である。制御システム1は、例えば、生産工程を自動化するためのFAシステムである。制御システム1は、情報処理装置100と、制御装置200と、外部装置300とを含む。情報処理装置100と、制御装置200と、外部装置300とは、第1ネットワークに接続されている。第1ネットワークには、EtherNET(登録商標)等の情報系ネットワークに適したネットワークが用いられる。
 制御装置200は、外部装置300における後述するデータベース410にアクセス可能である。なお、以下ではデータベースをDBとも称する。また、制御装置200は、フィールドに設けられた駆動装置(図示せず)と第2ネットワークで接続される。制御装置200は、駆動装置と定周期通信を行う。第2ネットワークには、EtherCAT(登録商標)、EtherNet/IP(登録商標)、CompoNet(登録商標)などが採用される。
 外部装置300は、データベース機能を有するDBMS(Database Management System)である。外部装置300は、例えば、ノート型またはデスクトップ型のPCまたはサーバである。より具体的には、外部装置300は、データベース410を有する。データベース410は、1または複数のテーブル420を保持する。テーブル420は、列を示す1または複数のカラムと、行を示す1または複数のレコードとを含む。各カラムには格納されるデータの種類に応じたデータ型が設定される。
 情報処理装置100は、例えば、ノート型またはデスクトップ型のPC(Personal Computer)、タブレット端末、スマートフォン、または、制御装置200用の制御プログラムを開発することが可能な装置である。制御プログラムは、ユーザプログラム(例えば、後述するユーザプログラム70)として制御装置200にインストールできる。以下では、制御プログラムをユーザプログラム(UPG)とも称する。情報処理装置100は、外部装置300におけるデータベース410にアクセス可能である。情報処理装置100は、記憶装置108、取得モジュール110、設定モジュール120、決定モジュール130および生成モジュール140を含む。記憶装置108は、開発支援プログラム30およびデータ型対応表40を含む。
 開発支援プログラム30は、制御装置200用の制御プログラムの開発を支援するためのプログラムである。情報処理装置100は、記憶装置108に格納された開発支援プログラム30が読み出されて実行されると、取得モジュール110、設定モジュール120、決定モジュール130および生成モジュール140の機能を実行可能となる。
 データ型対応表40は、データベース410のテーブル420におけるカラムのデータ型と、ユーザプログラム70における構造体におけるメンバのデータ型との対応関係を表わすリストである。構造体は、データの集まりを一定の形式で格納したものである。したがって、構造体は一つの単位として扱うことのできるデータ群ともいえる。構造体は互いに関連付けられたメンバを特定可能に含み得る。
 取得モジュール110は、データベース410に保持された1または複数のテーブル420のうち、情報処理装置100が受け付けたユーザ操作により選択されたテーブル420の情報を取得する。テーブル420の情報は、当該テーブル420を構成するカラムの数および各カラムのデータ型を含む。取得モジュール110は、例えば、第1テーブルのカラムの数として「4」を取得する。カラムの数「4」は、第1テーブルにおける第1カラム451と、第2カラム452と、第3カラム453と、第4カラム454とを合計した数である。なお、以下では、1または複数のカラムを総称してカラム450とも称する。
 取得モジュール110は、カラム450(例えば、第1カラム451~第4カラム454)のデータ型を取得する。より具体的には、取得モジュール110は、第1カラム451のデータ型として設定されている「decimal(1)」を取得する。取得モジュール110は、第2カラム452のデータ型として設定されている「decimal(5)」を取得する。取得モジュール110は、第3カラム453のデータ型として設定されている「nchar(19)」を取得する。取得モジュール110は、第4カラム454のデータ型として設定されている「TimeSTAMP」を取得する。「decimal」は、固定小数点数を扱うデータ型である。「nchar」は、固定長の文字列のテータ型である。「TimeSTAMP」は、年、月、日、時、分および秒の六つの属性を持つ時刻印のデータ型である。
 設定モジュール120は、取得モジュール110が取得したカラム450の数に対応する構造体を定義する。構造体は、ユーザプログラム70において利用可能であり、カラム数に対応する数のメンバを含む。より具体的には、設定モジュール120は、カラムの数「4」に対応した数「4」のメンバを含む構造体を定義する。設定モジュール120は、例えば、第1メンバ151、第2メンバ152、第3メンバ153および第4メンバ154を含む第1構造体を定義する。以下では、1または複数のメンバを総称してメンバ150とも称する。
 決定モジュール130は、取得モジュール110が取得した各カラム450のデータ型に対応付けて、構造体の各メンバ150のデータ型を決定する。より具体的には、決定モジュール130は、データ型対応表40に基づき、各カラム450のデータ型に対応付けて各メンバ150のデータ型を決定する。決定モジュール130は、第1カラム451のデータ型の「decimal(1)」に対応する第1メンバ151のデータ型として、「bool」を決定する。決定モジュール130は、第2カラム452のデータ型の「decimal(5)」に対応付する第2メンバ152のデータ型として、「Int」を決定する。決定モジュール130は、第3カラム453のデータ型の「nchar(19)」に対応する第3メンバ153のデータ型として、「String(20)」を決定する。決定モジュール130は、第4カラム454のデータ型の「TimeSTAMP」に対応付する第4メンバ154のデータ型として、「DATE_AND_TIME」を決定する。これにより、制御システム1は、テーブル420におけるカラム450と構造体におけるメンバ150との対応付けを容易に行える。
 生成モジュール140は、ユーザプログラム70を生成し、生成されたユーザプログラム70を制御装置200に送信する。制御装置200が構造体を構成する各メンバ150にデータを登録する。ユーザプログラム70は、一例として、当該データが登録された構造体のレコードをデータベース410のテーブル420に追加する処理を実行するためのプログラムである。制御システム1は、カラム450とメンバ150との対応付けが予め行われているため、データが登録された構造体のレコードのテーブル420への追加を含む処理を容易に行える。
 <第1の実施の形態>
 以下、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。
 [A.情報処理装置100のハードウェア構成]
 図2は、情報処理装置100のハードウェア構成を示す図である。図2を参照して、情報処理装置100は、制御部102と、主メモリ104と、記憶装置108と、通信インターフェイス112と、表示インターフェイス114と、I/Oインターフェイス116とを含む。
 制御部102は、記憶装置108に格納された開発支援プログラム30を読み出して、当該開発支援プログラム30を主メモリ104に展開する。制御部102は、取得モジュール110、設定モジュール120、決定モジュール130および生成モジュール140として機能する。なお、以下では制御部102が開発支援プログラム30実行することで必要な処理が実現される構成例について説明するが、これらの提供される処理の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGA等)を用いて実装してもよい。
 記憶装置108は、開発支援プログラム30、データ型対応表40、テンプレート60、ユーザプログラム70を含む。テンプレート60は、生成モジュール140がユーザプログラム70を生成する場合に、ひな形として用いられる。生成モジュール140がテンプレート60を用いてユーザプログラムを生成する具体例については後述する。
 通信インターフェイス112は、他の通信機器との間で、例えば、第1ネットワークを介してデータを遣り取りする。他の通信機器は、例えば、制御装置200、外部装置300などを含む。情報処理装置100は、通信インターフェイス112を介して、他の通信機器から、開発支援プログラム30などの各種プログラムをダウンロード可能なように構成されてもよい。
 表示インターフェイス114は、表示部122と電気的に接続され、制御部102などからの指令に従って、表示部122に対して、画像を表示するための画像信号を送出する。表示部122は、LCD(Liquid Crystal Display)や有機EL(Electro Luminescence)ディスプレイなどからなり、ユーザに対して各種情報を提示する。表示部122には、情報処理装置100によって提供される各種画面(例えば、後述するデータベース選択画面510(図3参照))が表示され得る。図2の例では、情報処理装置100と表示部122とが別体として示されているが、情報処理装置100と表示部122とは、一体的に構成されてもよい。
 I/Oインターフェイス116は、操作部124と電気的に接続され、操作部124からのユーザ操作を示す信号を取り込む。操作部124は、典型的には、キーボード、マウス、タッチパネル、タッチパッドなどからなり、ユーザからの操作を受け付ける。
 [B.カラム450とメンバ150とを対応付けるための設定の画面例]
 次に、図3~図8を用いてデータベース410におけるカラム450と、ユーザプログラム70におけるメンバ150とを対応付けるための設定の画面例について説明する。当該設定は、情報処理装置100が操作部124を用いたユーザ操作を受け付けることで実行される。
 [b1.データベース選択画面510]
 図3は、データベース410の種別の選択を受け付けるための画面例を表わす図である。図3を参照して、表示部122は、データベース種別、IPアドレス、インスタンス名、サービス名、ユーザ名およびパスワード等の項目と、次画面ボタン540および前画面ボタン542とを含むデータベース選択画面510を表示する。
 情報処理装置100は、例えば、操作部124を用いたユーザによるデータベース410の選択を受け付ける。データベース410の種別は、例えば、「Oracle Database」、「MySQL」および「SQLite」等である。データベースの種別はこれらに限定されることはなく、他の種類のデータベースであってもよい。
 情報処理装置100は、データベース種別を含むその他の情報の入力を受け付ける。その後、情報処理装置100は、操作部124を用いたユーザ操作により、次画面ボタン540が選択されると、図4に示すテーブル選択画面511を表示部122に表示する。なお、情報処理装置100は、操作部124を用いたユーザ操作により、前画面ボタン542が選択されると、データベース選択画面510が表示される直前に表示部122に表示されていた画面を表示する。
 [b2.テーブル選択画面511]
 図4は、データベース410のテーブル420の選択を受け付けるための画面例を表わす図である。図4を参照して、表示部122は、DBコネクションサービス設定、DBコネクション設定およびDBテーブル等の項目と、次画面ボタン540および前画面ボタン542とを含むテーブル選択画面511を表示する。情報処理装置100は、例えば、操作部124を用いたユーザによるテーブル420の選択を受け付ける。その後、情報処理装置100は、操作部124を用いたユーザ操作により、次画面ボタン540が選択されると、図5に示すデータ型選択画面512を表示部122に表示する。なお、情報処理装置100は、操作部124を用いたユーザ操作により、前画面ボタン542が選択されると、テーブル選択画面511が表示される直前に表示部122に表示されていた画面を表示する。
 [b3.データ型選択画面512]
 図5は、構造体のデータ型の選択を受け付けるための画面例を表わす図である。図5を参照して、表示部122は、第1テーブルのカラム名、DBデータ型およびUPGデータ型の項目と、次画面ボタン540および前画面ボタン542とを含むデータ型選択画面512を表示部122に表示する。第1テーブルは、前述のテーブル選択画面511で選択されたテーブルである。カラム名は、各カラム450の属性情報であり、テーブル420に含まれる情報である。カラム名は、例えば、「DATA1」~「DATA4」のように各カラム450を識別可能な情報である。DBデータ型は各カラム450に設定されたデータ型である。UPGデータ型は、各カラム450のデータ型に対応付けられる各メンバ150のデータ型である。当該対応付けは、データ型対応表40に基づいて行われる。
 情報処理装置100は、例えば、操作部124を用いたユーザによるUPGデータ型の選択を受け付ける。より具体的には、情報処理装置100の決定モジュール130は、選択欄558に表示されたデータ型の1または複数の候補に対する、操作部124を用いたユーザによる選択に従って、構造体の各メンバ150のデータ型を決定する。これにより、制御システム1は、カラム450のデータ型に対応付けることが可能なメンバ150のデータ型をユーザに対して提供できる。
 なお、データ型選択画面512に含まれるDBデータ型の情報は、取得モジュール110が、データベース410のテーブル420から取得したカラム450の数および各カラム450のデータ型に基づく情報である。また、データ型選択画面512に含まれるカラム名の情報は、取得モジュール110が、データベース410のテーブル420から取得した属性情報である。さらに、データ型選択画面512に含まれるUPGデータ型の情報は、設定モジュール120と決定モジュール130とにより定められた情報である。設定モジュール120は、取得モジュール110により取得されたカラム450の数に対応する数のメンバ150を含む構造体を定義する。決定モジュール130は、取得モジュール110により取得された各カラム450のデータ型に対応付けて、構造体の各メンバ150のデータ型を決定する。対応付けは、データ型対応表40に基づいて行われる。このように、決定モジュール130は、ユーザプログラム70で利用可能なデータ型の中から構造体の各メンバ150のデータ型を決定する。これにより、制御システム1は、テーブル420におけるカラム450のデータ型に適した構造体におけるメンバ150のデータ型を容易に対応付けられる。
 情報処理装置100は、操作部124を用いたユーザ操作により、次画面ボタン540が選択されると、図6に示すデータ型確認画面513を表示部122に表示する。なお、情報処理装置100は、操作部124を用いたユーザ操作により、前画面ボタン542が選択されると、データ型選択画面512が表示される直前に表示部122に表示されていた画面を表示する。
 [b4.データ型確認画面513]
 図6は、ユーザの確認用に構造体のデータ型を表示する画面例を表わす図である。図6を参照して、表示部122は、第1テーブルのメンバ名、UPGデータ型の項目と、次画面ボタン540および前画面ボタン542とを含むデータ型確認画面513を表示部122に表示する。表示部122は、データ型選択画面512においてユーザが操作部124を用いて選択した各メンバ150のUPGデータ型を表示する。また、表示部122は、各メンバ150のメンバ名として、データ型選択画面512に表示されたカラム名と同じ情報(例えば、「DATA1」~「DATA4」)を表示する。より具体的には、決定モジュール130は、各カラム450の属性情報であるカラム名を、メンバ150の属性情報であるメンバ名として登録する。このように決定モジュール130は、構造体の各メンバ150のメンバ名を、各カラム450のカラム名に対応付ける。これにより、制御システム1は、カラム450に対応付けられたメンバ150を識別可能な情報をユーザに提供できる。
 情報処理装置100は、操作部124を用いたユーザ操作により、次画面ボタン540が選択されると、図7に示す生成アイテム選択画面514を表示部122に表示する。なお、情報処理装置100は、操作部124を用いたユーザ操作により、前画面ボタン542が選択されると、データ型確認画面513が表示される直前に表示部122に表示されていた画面を表示する。
 [b5.生成アイテム選択画面514]
 図7は、構造体を含む生成アイテムを選択するための画面例を表わす図である。図7を参照して、表示部122は、構造体572、変数574、UPG576、Insert578およびSelect580の項目と、次画面ボタン540および前画面ボタン542とを含む生成アイテム選択画面514を表示部122に表示する。情報処理装置100の生成モジュール140は、操作部124を用いたユーザ操作により選択された項目に対応するデータを生成する。図7に示すように、構造体572、変数574、UPG576、Insert578の項目が選択されたものとして説明を行う。以下では、Insert578の項目が選択されたものとして説明を行うが、Select580の項目が選択された場合は、当該項目に対応するデータが生成される。また、Insert578とSelect580との両方の項目が選択された場合は、これらの項目に対応するデータが生成される。
 情報処理装置100は、操作部124を用いたユーザ操作により、次画面ボタン540が選択されると、図8に示す生成情報確認画面515を表示部122に表示する。なお、情報処理装置100は、操作部124を用いたユーザ操作により、前画面ボタン542が選択されると、生成アイテム選択画面514が表示される直前に表示部122に表示されていた画面を表示する。
 [b6.生成情報確認画面515]
 図8は、ユーザの確認用に生成された構造体および変数を表示する画面例を表わす図である。表示部122は、例えば、第1テーブルにおける構造体のメンバ名およびUPGデータ型と、変数の変数名および属性情報とを表示する。より具体的には、表示部122は、構造体のメンバ名として、図6において説明したカラム名に対応付けられたメンバ名(「DATA1~DATA4」)を表示する。また、表示部122は、図5において説明したDBデータ型に対応付けられるUPGデータ型として、各メンバ150のデータ型を表示する。表示部122は、各メンバ150のデータ型として、例えば、第1メンバ151に「bool」、第2メンバ152に「Int」、第3メンバ153に「String(20)」および第4メンバ154に「DATE_AND_TIME」を表示する。
 さらに、表示部122は、変数として変数名「InsertVal1」および属性情報「Table1」を表示する。変数名は、構造体全体を表わす変数名である。当該変数名は任意の値が設定される。属性情報は、構造体全体に対応するテーブル420を表わす。図8に示す各メンバ150を含む構造体は、第1テーブルの各カラム450に対応するものである。したがって、属性情報には「Table1」の情報が登録される。属性情報は、情報処理装置100の決定モジュール130により決定される。より具体的には、決定モジュール130は、図4において説明した操作部124を用いたユーザ操作により選択されたテーブル420のテーブル名を構造体の全体を参照するための変数の属性情報として対応付ける。これにより、制御システム1は、ユーザプログラム70における構造体がいずれのテーブル420に対応付けられたものかを示す情報をユーザに対して提供できる。そして、生成モジュール140は、当該変数名と当該属性情報とを含むデータを生成する。
 情報処理装置100は、操作部124を用いたユーザ操作により、完了ボタン544が選択されると、図8に示す生成情報確認画面515の表示を終了させる。なお、情報処理装置100は、操作部124を用いたユーザ操作により、前画面ボタン542が選択されると、生成情報確認画面515が表示される直前に表示部122に表示されていた画面を表示する。
 [C.ユーザプログラム70の構成と処理内容]
 次に、図9~図11を参照してユーザプログラム70の構成と処理内容について説明する。ユーザプログラム70は、上述の図3~図6における第1テーブルにおけるカラム450の数とデータ型とに対応する構造体におけるメンバ150の設定に基づくものである。生成モジュール140は、図7におけるUPG576およびInsert578が選択されることで、当該ユーザプログラム70を生成する。
 図9は、ユーザプログラム70に含まれるファンクションブロックFB1の一例を示す図である。以下、ファンクションブロックFB1をブロックFB1とも称する。
 ブロックFB1の機能を有するプログラムは、ファンクションブロック以外で規定されてもよい。例えば、ブロックFB1は、ラダーダイアグラムで規定されるもの、命令リスト、構造化テキスト、および、シーケンシャルファンクションチャートのいずれか、あるいは、これらの組み合わせで規定されるものも含み得る。また、ブロックFB1は、JavaScript(登録商標)やC言語のような汎用的なプログラミング言語で規定されるものも含み得る。
 ブロックFB1は、データベース410へのアクセスを制御する命令を実行するためのプログラムである。より具体的には、ブロックFB1は、データ型が定義され、当該データ型の条件を満たすデータが設定された構造体のレコードを、データベース410のテーブル420を追加する機能を有するプログラムである。
 ブロックFB1は、レコードの追加に関する設定を受け付ける入力部255A~入力部255Cと、レコードの追加に関する情報を出力するための出力部256A~出力部256Dとを含む。
 「Excute」として示される入力部255Aは、レコードの追加の処理を実行するか否かを指定するための設定を受け付ける。一例として、入力部255Aは、「BOOL」型の入力を受け付けるように規定されている。入力部255Aに「FALSE」が入力されている限り、レコードの追加の処理は、実行されない。一方で、入力部255Aに「TRUE」が入力された場合には、レコードの追加の処理が実行される。
 「DBConnection」として示される入力部255Bは、データベース410に接続するためのファンクションブロックを実行して得られる接続結果を受け付ける。当該接続結果には、データベース410のアクセスするための情報(例えば、データベース名など)が含まれている。
 「MappingVariableList」として示される入力部255Cは、構造体の変数の入力を受け付ける。入力部255Cは、予め定義された構造体を受け付けるように規定されている。
 レコードの追加の処理が正常に完了した場合には、正常終了を示す信号が、「Done」として示される出力部256Aから出力される。レコードの追加の処理中には、生成処理中を示す信号が、「Busy」として示される出力部256Bから出力される。レコードの追加の処理が正常に生成されなかった場合には、異常終了を示す信号が、「Error」として示される出力部256Cから出力される。この場合には、さらに、エラーの内容を識別するためのエラーIDが、「ErrorID」として示される出力部256Dから出力される。
 図10は、ファンクションブロックFB1を含むユーザプログラム70の一例について説明する図である。情報処理装置100は、記憶装置108に格納されたテンプレート60を用いて図10に示すユーザプログラム70の一部を生成する。テンプレート60は、例えば、入力要素IN0~IN4と、ブロックFB1と、出力要素OUT1とを含む。例えば、テンプレート60に含まれる入力要素IN0~IN4の変数と、出力要素OUT1の変数とはブランクとなっており、テンプレート60が選択された後に変数が割り付けられる。変数が割り付けられたテンプレート60を以下ではプログラムテンプレートと称する。プログラムテンプレートは、後述する第1プログラムテンプレート61および第2プログラムテンプレート62を含む。また、ブロックFB1は、図9で説明した、ファンクションブロックに相当する。
 第1プログラムテンプレート61は、入力要素IN0~IN4を含む。入力要素IN0~IN4には変数が割り付けられており、これらの値は、割り付けられている変数に応じて変化する。より具体的には、入力要素IN0には、変数「SettingTrigger」が割り付けられている。変数「SettingTrigger」は、BOOL型であり、初期値は、「False」(=OFF)である。変数「SettingTrigger」の値は、例えば、制御装置200が起動されたことに基づいて、「True」(ON)に変化する。その他の場合、変数「SettingTrigger」の値は、「False」(OFF)となる。
 入力要素IN1~IN4には、変数「val1」~変数「val4」が割り付けられている。これらの変数は、例えば、制御装置200がフィールド値に基づいて演算を実行することで得られるプロセス値を含む。フィールド値は、制御装置200がフィールドに設けられた駆動装置から第2ネットワーク介して取得した値である。入力要素IN1~IN4により、変数「val1」~変数「val4」の各変数の値は、「InsertVal[0]」~「InsertVal[3]」に設定される。「InsertVal[0]」~「InsertVal[3]」は、構造体全体を表わす変数「InsertVal」に基づく値であり、第1メンバ151~第4メンバ154に設定される値である。
 入力要素IN1~IN4により構造体の各メンバ150にプロセス値が設定されると、ブロックFB1により、構造体の各メンバ150により構成されるレコードがテーブル420に追加される。
 出力要素OUT1には、変数「Done」が割り付けられている。また、出力要素OUT1は、ブロックFB1の出力「Done」に関連付けられている。その結果、出力要素OUT1の値は、ブロックFB1の出力「Done」の値に応じて変化する。
 図11は、テーブル420にレコードを追加する一例を示した図である。テーブル420における各カラム450(第1カラム451~第4カラム454)は、属性情報である「DATA1」~「DATA4」を有する。また、レコード461は、各カラム450のデータ型に応じたプロセス値が設定されている。そして、生成モジュール140が生成した第1プログラムテンプレート61により、構造体におけるレコード462がテーブル420に追加される。構造体のレコード462にはテーブル420の各カラムのデータ型に対応付けられたデータ型が各メンバ150(第1メンバ151~第4メンバ154)に設定されている。そして、レコード462は、各メンバ150のデータ型に応じたプロセス値が設定されている。テンプレート60に対して変数が割り付けられた第1プログラムテンプレート61が実行されることで、テーブル420にレコード462が追加される。
 このように、生成モジュール140は、構造体における各メンバ150に設定された値(プロセス値)からなるレコードを、対応するテーブル420に追加する処理を実行させるための第1プログラムテンプレート61をテンプレート60に基づいて生成する。当該第1プログラムテンプレート61は、テンプレート60に基づいて生成されたプログラムであり、テンプレート60においてブランクとなっている変数が割り付けられたものである。制御システム1は、プログラムテンプレートを用いることで、データベース410にアクセス可能なユーザプログラム70を容易に生成できる。
 [D.ハードウェア構成]
 [d1.制御装置200のハードウェア構成]
 次に、図12を参照して、制御装置200のハードウェア構成について説明する。図12は、制御装置200のハードウェア構成の一例を示す模式図である。
 制御装置200は、通信インターフェイス201と、CPUやMPUなどのプロセッサ202と、チップセット204と、主メモリ206と、不揮発性の記憶装置208と、内部バスコントローラ222と、フィールドバスコントローラ224と、メモリカードインターフェイス239とを含む。
 プロセッサ202は、記憶装置208に格納されたユーザプログラム70およびシステムプログラム80を含む制御プログラムを読み出して主メモリ206に展開して実行する。プロセッサ202は、制御プログラムを実行することで、サーボドライバ280Aおよび280Bなどに対する任意の制御を実現する。制御プログラムは、制御装置200を制御するための各種プログラムを含む。制御プログラムに含まれるシステムプログラム80は、データの入出力処理や実行タイミング制御などの、制御装置200の基本的な機能を提供するための命令コードを含む。ユーザプログラム70は、上述の情報処理装置100からダウンロードされたものである。ユーザプログラム70は、制御対象に応じて任意に設計され、シーケンス制御を実行する。
 チップセット204は、各コンポーネントを制御することで、制御装置200全体としての処理を実現する。
 記憶装置208は、制御プログラムの他にも種々のデータを格納する。一例として、記憶装置208は、上述のデータ型対応表40等を格納する。
 内部バスコントローラ222は、制御装置200と内部バスを通じて連結される各種デバイスとデータを遣り取りするインターフェイスである。このようなデバイスの一例として、I/Oユニット226が接続されている。フィールドバスコントローラ224は、制御装置200とフィールドバスを通じて連結される各種の駆動機器とデータを遣り取りするインターフェイスである。このようなデバイスの一例として、上述のサーボドライバ280Aおよび280Bが接続されている。他にも、視覚センサ(図示せず)などの駆動機器が接続されてもよい。
 内部バスコントローラ222およびフィールドバスコントローラ224は、接続されているデバイスに対して任意の指令を与えることができるとともに、デバイスが管理している任意のデータを取得することができる。また、内部バスコントローラ222および/またはフィールドバスコントローラ224は、サーボドライバ280Aおよび280Bとの間でデータを遣り取りするためのインターフェイスとしても機能する。
 通信インターフェイス201は、各種の有線/無線ネットワークを通じたデータの遣り取りを制御する。制御装置200は、通信インターフェイス201を介して、情報処理装置100や外部装置300と通信を行う。また、制御装置200は、通信インターフェイス201を介して、外部装置300上のデータベース410にアクセスすることができる。
 メモリカードインターフェイス239は、外部記憶媒体の一例であるメモリカード240(例えば、SDカード)を着脱可能に構成されており、メモリカード240に対してデータを書き込み、メモリカード240からデータを読出すことが可能になっている。
 [d2.外部装置300のハードウェア構成]
 次に、図13を参照して、外部装置300のハードウェア構成について説明する。図13は、外部装置300のハードウェア構成を示すブロック図である。
 外部装置300は、汎用的なアーキテクチャを有するハードウェア構成を有している。すなわち、外部装置300は、一種のパーソナルコンピュータとして実装される。但し、外部装置300を汎用的なハードウェアではなく、専用ハードウェアを用いて実装してもよい。
 より具体的には、外部装置300は、CPUやMPUなどのプロセッサ302と、主メモリ304と、不揮発性の記憶装置308と、通信インターフェイス312と、I/Oインターフェイス314と、表示インターフェイス316とを含む。これらのコンポーネントは、内部バス325を介して、互いにデータ通信可能に接続されている。
 プロセッサ302は、記憶装置308に格納された制御プログラム(図示しない)を読み出して、主メモリ304に展開して実行することで、外部装置300を制御する。すなわち、プロセッサ302は、主メモリ304および記憶装置308と連係することで、制御演算を実行する制御部を実現する。
 通信インターフェイス312、I/Oインターフェイス314、および、表示インターフェイス316は、外部装置300と他の通信機器とのデータの遣り取りを仲介する。
 より具体的には、通信インターフェイス312は、図1における第1ネットワークなどを介した、制御装置200との通信を仲介する。通信インターフェイス312には、例えば、EtherNETに従う通信が可能なコンポーネントが採用され得る。
 I/Oインターフェイス314は、操作部324に接続され、操作部324からのユーザ操作を示す信号を取り込む。操作部324は、典型的には、キーボード、マウス、タッチパネル、タッチパッドなどからなり、ユーザからの操作を受け付ける。表示インターフェイス316は、表示部322と接続され、プロセッサ302などからの指令に従って、表示部322に対して、画像を表示するための画像信号を送出する。表示部322は、LCDや有機ELディスプレイなどからなり、ユーザに対して各種情報を提示する。図14の例では、外部装置300および表示部322が別体として示されているが、外部装置300および表示部322は、一体的に構成されてもよい。
 [E.制御処理手順]
 [e1.制御システム1における処理手順]
 図14は、制御システム1の処理手順について説明するフローチャートである。図14を参照して、情報処理装置100と制御装置200と外部装置300との間のデータの流れについて説明する。ステップS10において、情報処理装置100は、起動命令を受け付けたとする。このことに基づいて、情報処理装置100は起動後に開発支援プログラム30が実行されることで、データベース選択画面510を表示部122に表示する。
 ステップS15において、情報処理装置100は、データベース選択画面510におけるデータベース410の選択操作を受け付けたとする。このことに基づいて、情報処理装置100は、選択されたデータベース410に格納されるテーブル420の取得命令を制御装置200を介して外部装置300に送信する。外部装置300は、テーブル420の情報を制御装置200を介して情報処理装置100に出力する。情報処理装置100は、外部装置300から送信されたテーブル420の情報に基づき、テーブル選択画面511を表示部122に表示する。
 ステップS20において、情報処理装置100は、テーブル選択画面511におけるテーブル420の選択操作を受け付けたとする。このことに基づいて、情報処理装置100は、選択されたテーブル420に含まれるカラム450の情報の取得命令を制御装置200を介して外部装置300に出力する。外部装置300は、カラム450の情報を制御装置200を介して情報処理装置100に出力する。情報処理装置100は、外部装置300から送信されたカラム450の情報に基づき、データ型選択画面512を表示部122に表示する。
 ステップS25において、情報処理装置100は、データ型選択画面512におけるUPGデータ型の選択操作を受け付けたとする。このことに基づいて、情報処理装置100は、データ型確認画面513を表示部122に表示する。
 ステップS30において、情報処理装置100は、データ型確認画面513におけるUPGデータ型確認操作を受け付けたとする。このことに基づいて、情報処理装置100は、生成アイテム選択画面514を表示部122に表示する。
 ステップS35において、情報処理装置100は、生成アイテム選択画面514における生成アイテムの選択操作を受け付けたとする。このことに基づいて、情報処理装置100は、生成情報確認画面515を表示部122に表示する。
 ステップS40において、情報処理装置100は、生成情報確認画面515における生成情報の確認完了操作を受け付けたとする。このことに基づいて、情報処理装置100はテンプレート60に基づいて第1プログラムテンプレート61を含むユーザプログラム70を生成して、生成されたユーザプログラム70を情報処理装置に送信する。
 これまで説明したステップS10、ステップS15、ステップS20、ステップS25、ステップS30、ステップS35およびステップS40は、制御装置200が運用される前の処理である。次に制御装置200の運用後の処理について説明する。
 ステップS45において、制御装置200は、ユーザプログラム70の処理を開始する。制御装置200は、ユーザプログラム70に含まれる第1プログラムテンプレート61を実行して、外部装置300のデータベース410におけるテーブル420にレコードを追加する。当該レコードは制御装置200の構造体の各メンバ150により構成されるレコードである。外部装置300は、例えば、レコードの追加処理が成功したことを示す応答を制御装置200に送信する。
 [e2.情報処理装置100における処理手順]
 上述の図14を用いて説明した処理手順における制御装置200の運用前の処理は、例えば、情報処理装置100により実行される処理である。図15および図16は、情報処理装置100が運用前の処理を行う場合の処理手順について説明するフローチャートである。図15を参照して、ステップS105において、情報処理装置100は、操作部124を用いたユーザ操作により、起動命令を受け付けて起動する。
 ステップS110において、情報処理装置100は、起動後に開発支援プログラム30が実行されることで、データベース選択画面510を表示部122に表示する。
 ステップS115において、情報処理装置100は、データベース選択画面510におけるデータベース410の選択操作を受け付けたか否かを判定する。情報処理装置100は、データベース410の選択操作を受け付けたと判定すると(ステップS115においてYES)、制御をステップS120に切り替える。そうでない場合には(ステップS115においてNO)、情報処理装置100は、制御をステップS125に切り替える。
 ステップS120において、情報処理装置100は、外部装置300から送信されたテーブル420の情報に基づき、テーブル選択画面511を表示部122に表示する。
 ステップS125において、情報処理装置100は、タイマー(図示せず)を用いて、データベース410の選択操作を受け付けたか否かを判定した時点から経過した時間を計測する。所定期間(例えば、1分間)を経過してタイムアウトした場合には(ステップS125においてYES)、情報処理装置100は、本フローチャートの処理を終了する。そうでない場合には(ステップS125においてNO)、情報処理装置100は、ステップS115の制御を繰り返し実行する。
 ステップS130において、情報処理装置100は、データベース選択画面510におけるテーブル420の選択操作を受け付けたか否かを判定する。情報処理装置100は、テーブル420の選択操作を受け付けたと判定すると(ステップS130においてYES)、制御をステップS135に切り替える。そうでない場合には(ステップS130においてNO)、情報処理装置100は、制御をステップS140に切り替える。
 ステップS135において、情報処理装置100は、外部装置300から送信されたカラム450の情報に基づき、データ型選択画面512を表示部122に表示する。
 ステップS140において、情報処理装置100は、タイマー(図示せず)を用いて、テーブル420の選択操作を受け付けたか否かを判定した時点から経過した時間を計測する。所定期間(例えば、1分間)を経過してタイムアウトした場合には(ステップS140においてYES)、情報処理装置100は、本フローチャートの処理を終了する。そうでない場合には(ステップS140においてNO)、情報処理装置100は、ステップS130の制御を繰り返し実行する。
 ステップS145において、情報処理装置100は、データ型選択画面512におけるUPGデータ型の選択操作を受け付けたか否かを判定する。情報処理装置100は、データ型の選択操作を受け付けたと判定すると(ステップS145においてYES)、制御をステップS150に切り替える。そうでない場合には(ステップS145においてNO)、情報処理装置100は、制御をステップS155に切り替える。
 ステップS150において、情報処理装置100は、データ型確認画面513を表示部122に表示する。
 ステップS155において、情報処理装置100は、タイマー(図示せず)を用いて、データ型の選択操作を受け付けたか否かを判定した時点から経過した時間を計測する。所定期間(例えば、1分間)を経過してタイムアウトした場合には(ステップS155においてYES)、情報処理装置100は、本フローチャートの処理を終了する。そうでない場合には(ステップS155においてNO)、情報処理装置100は、ステップS145の制御を繰り返し実行する。
 次に、図16を参照して、ステップS160において、情報処理装置100は、データ型確認画面513におけるUPGデータ型の確認操作を受け付けたか否かを判定する。情報処理装置100は、UPGデータ型の確認操作を受け付けたと判定すると(ステップS160においてYES)、制御をステップS165に切り替える。そうでない場合には(ステップS160においてNO)、情報処理装置100は、制御をステップS170に切り替える。
 ステップS165において、情報処理装置100は、生成アイテム選択画面514を表示部122に表示する。
 ステップS170において、情報処理装置100は、タイマー(図示せず)を用いて、UPGデータ型の確認操作を受け付けたか否かを判定した時点から経過した時間を計測する。所定期間(例えば、1分間)を経過してタイムアウトした場合には(ステップS170においてYES)、情報処理装置100は、本フローチャートの処理を終了する。そうでない場合には(ステップS170においてNO)、情報処理装置100は、ステップS160の制御を繰り返し実行する。
 ステップS175において、情報処理装置100は、生成アイテム選択画面514における生成アイテムの選択操作を受け付けたか否かを判定する。情報処理装置100は、生成アイテムの選択操作を受け付けたと判定すると(ステップS175においてYES)、制御をステップS180に切り替える。そうでない場合には(ステップS175においてNO)、情報処理装置100は、制御をステップS185に切り替える。
 ステップS180において、情報処理装置100は、生成情報確認画面515を表示部122に表示する。
 ステップS185において、情報処理装置100は、タイマー(図示せず)を用いて、生成アイテムの選択操作を受け付けたか否かを判定した時点から経過した時間を計測する。所定期間(例えば、1分間)を経過してタイムアウトした場合には(ステップS185においてYES)、情報処理装置100は、本フローチャートの処理を終了する。そうでない場合には(ステップS185においてNO)、情報処理装置100は、ステップS175の制御を繰り返し実行する。
 ステップS190において、情報処理装置100は、生成情報確認画面515における生成情報の確認完了操作を受け付けたか否かを判定する。情報処理装置100は、生成情報の確認完了操作を受け付けたと判定すると(ステップS190においてYES)、制御をステップS195に切り替える。そうでない場合には(ステップS190においてNO)、情報処理装置100は、制御をステップS200に切り替える。
 ステップS195において、情報処理装置100は、例えば、第1プログラムテンプレート61を含むユーザプログラム70を生成する。
 ステップS200において、情報処理装置100は、タイマー(図示せず)を用いて、生成情報の確認完了操作を受け付けたか否かを判定した時点から経過した時間を計測する。所定期間(例えば、1分間)を経過してタイムアウトした場合には(ステップS200においてYES)、情報処理装置100は、本フローチャートの処理を終了する。そうでない場合には(ステップS200においてNO)、情報処理装置100は、ステップS190の制御を繰り返し実行する。
 ステップS205において、情報処理装置100は、生成したユーザプログラム70を制御装置200に送信する。
 <第2の実施の形態>
 以下、本開示に係る第2の実施の形態について説明する。第2の実施の形態に係る制御システム1aに含まれる構成は、上述の第1の実施の形態に係る制御システム1に含まれる構成と一部のハードウェア構成が異なり、その他は同様のハードウェア構成を用いて実現される。また、第2の実施の形態に係る制御システム1aに含まれる構成により実現される処理は、第1の実施の形態に係る情報処理装置100に含まれる構成により実現される処理と一部が異なる以外は同様の処理を実行する。以下では、図17を参照して、制御システム1に含まれる構成のハードウェア構成および処理について、同じ内容についての説明は繰り返さずに、異なる構成および処理の内容について説明する。
 図17は、第2の実施の形態における制御システム1aの構成例について説明する図である。上述の第1の実施の形態では、制御システム1に含まれる1つの情報処理装置100がテーブル420の情報(カラムの数およびデータ型)を取得する。そして、情報処理装置100は、構造体のメンバ150の数とデータ型とを決定した後、生成したユーザプログラム70を制御装置200に出力することについて説明した。すなわち、1つの情報処理装置100が、取得モジュール110、設定モジュール120、決定モジュール130および生成モジュール140の機能を有する。そして、1つの情報処理装置100が当該機能を用いた処理を実行することについて説明した。これに対して、図17に示す第2の実施の形態では、制御システム1aに含まれる複数の情報処理装置100が、上記の機能を用いた処理を実行する。
 制御システム1aは、第1情報処理装置100aと、第2情報処理装置100bとを含む。第1情報処理装置100aは、取得モジュール110、設定モジュール120、決定モジュール130の機能を有する。第2情報処理装置100bは、生成モジュール140を有する。第1情報処理装置100aの取得モジュール110は、テーブル420の情報を取得する。第1情報処理装置100aの設定モジュール120および決定モジュール130は、構造体のメンバ150の数とデータ型とを決定した後、当該メンバ150の数とデータ型とを含む情報をエクスポートする。第1情報処理装置100aは、例えば、上記情報を予め定めたデータ形式のファイルで出力する。予め定められたデータ形式は、例えば、CSV(Comma Separated Values)形式等である。
 第2情報処理装置100bの生成モジュール140は、ユーザプログラム70を生成する。生成されたユーザプログラム70は、制御装置200にインポートされる。
 このように、制御システム1aは、全てのモジュールのうち一部のモジュールの機能を有する情報処理装置100と、他のモジュールの機能を有する別の情報処理装置100とにより構成される。これにより、制御システム1aは、複数の情報処理装置100を用いてモジュールの機能の追加等を容易に行える。
 <第3の実施の形態>
 以下、本開示に係る第3の実施の形態について説明する。第3の実施の形態に係る制御システム1bに含まれる構成は、上述の第1の実施の形態に係る制御システム1に含まれる構成と一部のハードウェア構成が異なり、その他は同様のハードウェア構成を用いて実現される。また、第3の実施の形態に係る制御システム1bに含まれる構成により実現される処理は、第1の実施の形態に係る情報処理装置100に含まれる構成により実現される処理と一部が異なる以外は同様の処理を実行する。以下では、図18を参照して、制御システム1に含まれる構成のハードウェア構成および処理について、同じ内容についての説明は繰り返さずに、異なる構成および処理の内容について説明する。
 図18は、第3の実施の形態における制御システム1bの構成例について説明する図である。上述の第1の実施の形態では、制御システム1に含まれる情報処理装置100がテーブル420の情報(カラムの数およびデータ型)を取得する。そして、情報処理装置100は、構造体のメンバの数とデータ型とを決定した後、生成したユーザプログラム70を制御装置200に出力することについて説明した。すなわち、情報処理装置100が、取得モジュール110、設定モジュール120、決定モジュール130および生成モジュール140の機能を有する。そして、情報処理装置100が当該機能を用いた処理を実行することについて説明した。これに対して、第3の実施の形態では、制御システム1bに含まれる制御装置200が、取得モジュール110、設定モジュール120、決定モジュール130および生成モジュール140の機能を有する。制御装置200は、これらのモジュール機能を用いた処理を実行する。
 制御装置200の取得モジュール110は、テーブル420の情報(カラムの数およびデータ型)を取得する。そして、設定モジュール120が構造体のメンバ150を定義した後、決定モジュール130は、構造体のデータ型を決定する。生成モジュール140は、生成したユーザプログラム70等を制御装置200内で実行する。
 なお、第1の実施の形態では、情報処理装置100は、開発支援プログラム30が実行されることで、操作部124を用いたユーザ操作により、各モジュールの機能が実行されることについて説明した。これに対して、制御装置200の記憶装置208には、開発支援プログラム30が格納されていない。制御装置200は、各モジュールの機能をユーザの操作を受け付けることなく自動で実行する。このように、制御装置200が自動で各モジュールの機能を実行するためのユーザプログラム70について、図19および図20を用いて以下説明する。
 図19は、ユーザプログラム70に含まれるファンクションブロックFB2の一例を示す図である。以下、ファンクションブロックFB2をブロックFB2とも称する。
 ブロックFB2の機能を有するプログラムは、ファンクションブロック以外で規定されてもよい。例えば、ブロックFB2は、ラダーダイアグラムで規定されるもの、命令リスト、構造化テキスト、および、シーケンシャルファンクションチャートのいずれか、あるいは、これらの組み合わせで規定されるものも含み得る。また、ブロックFB2は、JavaScriptやC言語のような汎用的なプログラミング言語で規定されるものも含み得る。
 ブロックFB2は、データベース410へのアクセスを制御する命令を実行するためのプログラムである。より具体的には、ブロックFB2は、テーブル420からテーブル情報を取得して、構造体のメンバ150を定義した後、構造体のデータ型を決定する機能を有するプログラムである。
 ブロックFB2は、レコードの追加に関する設定を受け付ける入力部257A~入力部257Dと、レコードの追加に関する情報を出力するための出力部258A~出力部258Dとを含む。
 「Excute」として示される入力部257Aは、レコードの追加の処理を実行するか否かを指定するための設定を受け付ける。
 「DBConnection」として示される入力部257Bは、データベース410に接続するためのファンクションブロックを実行して得られる接続結果を受け付ける。当該接続結果には、データベース410のアクセスするための情報(例えば、データベース名など)が含まれている。
 「TableName」として示される入力部257Cは、テーブル名の設定を受け付ける。入力部257Cは、例えば、「DWORD」型の変数を受け付けるように規定されている。
 「MappingVariableList」として示される入力部257Dは、構造体の変数の入力を受け付ける。入力部257Dは、予め定義された構造体を受け付けるように規定されている。
 ブロックFB2の入力部257Cにはテーブル420のテーブル名(例えば、「Table1」)と、入力部257Dには構造体の全体を参照するための変数(例えば、InsertVal1)とがそれぞれ引数として設定される。これにより、制御システム1bは、構造体の定義と当該構造体のデータ型の決定とを含む処理を制御装置200に自動で実行させることができる。
 レコードの追加の処理が正常に完了した場合には、正常終了を示す信号が、「Done」として示される出力部258Aから出力される。レコードの追加の処理中には、生成処理中を示す信号が、「Busy」として示される出力部258Bから出力される。レコードの追加の処理が正常に生成されなかった場合には、異常終了を示す信号が、「Error」として示される出力部258Cから出力される。この場合には、さらに、エラーの内容を識別するためのエラーIDが、「ErrorID」として示される出力部258Dから出力される。
 図20は、ファンクションブロックFB2を含むユーザプログラム70の一例について説明する図である。制御装置200は、記憶装置108に格納されたテンプレート60を用いて図10に示すユーザプログラム70の一部を生成する。テンプレート60は、例えば、入力要素IN0~IN4と、ブロックFB1およびブロックFB2と、出力要素OUT1とを含む。例えば、テンプレート60に含まれる入力要素IN0~IN4の変数と、出力要素OUT1の変数とはブランクとなっており、テンプレート60が選択された後に変数が割り付けられる。また、ブロックFB1は、図9で説明した、ファンクションブロックに相当する。
 入力要素IN0~IN4、ブロックFB1および出力要素OUT1の機能は、上述の図10で説明した機能と同じである。第2プログラムテンプレート62に含まれる入力要素IN0~IN4には変数が割り付けられており、これらの値は、割り付けられている変数に応じて変化する。上述のようにブロックFB2には、テーブル420のテーブル名と構造体の全体を参照するための変数とがそれぞれ引数として設定される。制御装置200は、ブロックFB2の機能により、構造体の定義と当該構造体のデータ型の決定とを含む処理を自動で実行する。
<変形例>
 第1の実施の形態~第3の実施の形態において、図3~図8を用いて各画面に表示される項目について説明した。これに対して、各画面に表示される項目は一例であり、他の項目を表示して当該項目に対する選択を受け付けるようにしてもよい。
 第1の実施の形態~第3の実施の形態において、ファンクショブロックに設けられる各入力部と各出力部とについて説明した。これに対して、説明した入力部および出力部は一例であり、説明した以外の入力部および出力部がファンクションブロック設けられてもよい。
 第2の実施の形態において、第1情報処理装置100aは、取得モジュール110、設定モジュール120、決定モジュール130の機能を有する。また、第2情報処理装置100bは、生成モジュール140を有することについて説明した。これに対して、それぞれの情報処理装置100が有するモジュールの機能は一例であり、各情報処理装置100はどのモジュールの機能を有していてもよい。また、情報処理装置100は、上記とは異なるモジュールの機能を有していてもよい。
 <付記>
 以上のように、本実施の形態は以下のような開示を含む。
 [構成1]
 制御対象を制御するための制御システム(1)であって、
 1または複数のテーブル(420)を保持しているデータベース(410)と、
 制御プログラム(70)を実行する、前記データベース(410)にアクセス可能な制御装置(200)と、
 前記1または複数のテーブル(420)のうち選択されたテーブル(420)を構成するカラム(450)の数および各カラム(450)のデータ型を取得する取得手段(110)と、
 前記取得したカラム(450)の数に対応する数のメンバ(150)を含む、前記制御プログラム(70)において利用可能な構造体を定義する設定手段(120)と、
 前記取得した各カラム(450)のデータ型に対応付けて、前記構造体の各メンバ(150)のデータ型を決定する決定手段(130)とを備える、制御システム。
 [構成2]
 前記決定手段(130)は、前記制御プログラム(70)で利用可能なデータ型の中から前記構造体の各メンバ(150)のデータ型を決定する、構成1に記載の制御システム。
 [構成3]
 前記決定手段(130)は、データ型の1または複数の候補に対する、ユーザによる選択に従って、前記構造体の各メンバ(150)のデータ型を決定する、構成1または2に記載の制御システム。
 [構成4]
 前記決定手段(130)は、前記選択されたテーブル(420)のテーブル名を、前記構造体の全体を参照するための変数の属性情報として対応付ける、構成1~3のいずれか1項に記載の制御システム。
 [構成5]
 前記決定手段(130)は、前記構造体の各メンバ(150)のメンバ名を、前記各カラム(450)のカラム名に対応付ける、構成1~4のいずれか1項に記載の制御システム。
 [構成6]
 前記制御プログラム(70)は前記データベース(410)へのアクセスを制御する命令を実行するためのファンクションブロックを含み、
 前記ファンクションブロックには、前記テーブル(420)のテーブル名と、前記構造体の全体を参照するための変数とがそれぞれ引数として設定される、構成1~5のいずれか1項に記載の制御システム。
 [構成7]
 前記各メンバ(150)に設定された値からなるレコードを、対応するテーブル(420)に追加する処理を実行させるためのプログラムテンプレート(61、62)を生成する生成部(140)をさらに備える、構成1~6のいずれか1項に記載の制御システム。
 [構成8]
 前記制御装置(200)で実行される制御プログラム(70)の開発を支援する情報処理装置(100)をさらに備え、
 前記情報処理装置(100)は、
  前記取得手段(110)、前記設定手段(120)および前記決定手段(130)を含む、構成1~7のいずれか1項に記載の制御システム。
 [構成9]
 制御装置(200)で実行される制御プログラム(70)の開発を支援する情報処理装置(100)であって、
 前記制御装置(200)がアクセス可能なデータベース(70)が保持している1または複数のテーブル(70)のうち選択されたテーブル(70)を構成するカラム(450)の数よび各カラム(450)のデータ型を取得する取得手段(110)と、
 前記取得したカラム(450)の数に対応する数のメンバ(150)を含む、前記制御プログラム(70)において利用可能な構造体を定義する設定手段(120)と、
 前記取得した各カラム(450)のデータ型に対応付けて、前記構造体の各メンバ(150)のデータ型を決定する決定手段(130)とを備える、情報処理装置。
 [構成10]
 制御装置(200)で実行される制御プログラム(70)の開発を支援する情報処理装置(100)の情報処理プログラムであって、
 前記情報処理プログラムは前記情報処理装置(100)に、
 前記制御装置(200)がアクセス可能なデータベース(70)が保持している1または複数のテーブル(420)のうち選択されたテーブル(420)を構成するカラム(450)の数よび各カラム(450)のデータ型を取得するステップ(S20)と、
 前記取得したカラム(450)の数に対応する数のメンバ(150)を含む、前記制御プログラム(70)において利用可能な構造体を定義するステップ(S25)と、
 前記取得した各カラム(450)のデータ型に対応付けて、前記構造体の各メンバ(150)のデータ型を決定するステップ(S30)とを実行させる、情報処理プログラム。
 今回開示された実施の形態は全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味および範囲内での全ての変更が含まれることが意図される。
 1,1a,1b 制御システム、30 開発支援プログラム、40 データ型対応表、60 テンプレート、61 第1プログラムテンプレート、62 第2プログラムテンプレート、70 ユーザプログラム、80 システムプログラム、100 情報処理装置、100a 第1情報処理装置、100b 第2情報処理装置、102 制御部、104,206,304 主メモリ、108,208,308 記憶装置、110 取得モジュール、112,201,312 通信インターフェイス、114,316 表示インターフェイス、116,314 I/Oインターフェイス、120 設定モジュール、122,322 表示部、124,324 操作部、130 決定モジュール、140 生成モジュール、150 メンバ、151 第1メンバ、152 第2メンバ、153 第3メンバ、154 第4メンバ、200 制御装置、202,302 プロセッサ、204 チップセット、222 内部バスコントローラ、224 フィールドバスコントローラ、226 I/Oユニット、239 メモリカードインターフェイス、240 メモリカード、255A,255B,255C,257A,257B,257C,257D 入力部、256A,256B,256C,256D,258A,258B,258C,258D 出力部、280A,280B サーボドライバ、300 外部装置、325 内部バス、410 データベース、420 テーブル、450 カラム、451 第1カラム、452 第2カラム、453 第3カラム、454 第4カラム、461,462 レコード、510 データベース選択画面、511 テーブル選択画面、512 データ型選択画面、513 データ型確認画面、514 生成アイテム選択画面、515 生成情報確認画面、540 次画面ボタン、542 前画面ボタン、544 完了ボタン、558 選択欄、572 構造体、574 変数、FB1,FB2 ファンクションブロック(ブロック)。

Claims (10)

  1.  制御対象を制御するための制御システムであって、
     1または複数のテーブルを保持しているデータベースと、
     制御プログラムを実行する、前記データベースにアクセス可能な制御装置と、
     前記1または複数のテーブルのうち選択されたテーブルを構成するカラムの数および各カラムのデータ型を取得する取得手段と、
     前記取得したカラムの数に対応する数のメンバを含む、前記制御プログラムにおいて利用可能な構造体を定義する設定手段と、
     前記取得した各カラムのデータ型に対応付けて、前記構造体の各メンバのデータ型を決定する決定手段とを備える、制御システム。
  2.  前記決定手段は、前記制御プログラムで利用可能なデータ型の中から前記構造体の各メンバのデータ型を決定する、請求項1に記載の制御システム。
  3.  前記決定手段は、データ型の1または複数の候補に対する、ユーザによる選択に従って、前記構造体の各メンバのデータ型を決定する、請求項1または2に記載の制御システム。
  4.  前記決定手段は、前記選択されたテーブルのテーブル名を、前記構造体の全体を参照するための変数の属性情報として対応付ける、請求項1~3のいずれか1項に記載の制御システム。
  5.  前記決定手段は、前記構造体の各メンバのメンバ名を、前記各カラムのカラム名に対応付ける、請求項1~4のいずれか1項に記載の制御システム。
  6.  前記制御プログラムは、前記データベースへのアクセスを制御する命令を実行するためのファンクションブロックを含み、
     前記ファンクションブロックには、前記テーブルのテーブル名と、前記構造体の全体を参照するための変数とがそれぞれ引数として設定される、請求項1~5のいずれか1項に記載の制御システム。
  7.  前記各メンバに設定された値からなるレコードを、対応するテーブルに追加する処理を実行させるためのプログラムテンプレートを生成する生成部をさらに備える、請求項1~6のいずれか1項に記載の制御システム。
  8.  前記制御装置で実行される制御プログラムの開発を支援する情報処理装置をさらに備え、
     前記情報処理装置は、
      前記取得手段、前記設定手段および前記決定手段を含む、請求項1~7のいずれか1項に記載の制御システム。
  9.  制御装置で実行される制御プログラムの開発を支援する情報処理装置であって、
     前記制御装置がアクセス可能なデータベースが保持している1または複数のテーブルのうち選択されたテーブルを構成するカラムの数よび各カラムのデータ型を取得する取得手段と、
     前記取得したカラムの数に対応する数のメンバを含む、前記制御プログラムにおいて利用可能な構造体を定義する設定手段と、
     前記取得した各カラムのデータ型に対応付けて、前記構造体の各メンバのデータ型を決定する決定手段とを備える、情報処理装置。
  10.  制御装置で実行される制御プログラムの開発を支援する情報処理装置の情報処理プログラムであって、
     前記情報処理プログラムは前記情報処理装置に、
     前記制御装置がアクセス可能なデータベースが保持している1または複数のテーブルのうち選択されたテーブルを構成するカラムの数よび各カラムのデータ型を取得するステップと、
     前記取得したカラムの数に対応する数のメンバを含む、前記制御プログラムにおいて利用可能な構造体を定義するステップと、
     前記取得した各カラムのデータ型に対応付けて、前記構造体の各メンバのデータ型を決定するステップとを実行させる、情報処理プログラム。
PCT/JP2020/005789 2019-03-08 2020-02-14 制御システム、情報処理装置、および情報処理プログラム WO2020184061A1 (ja)

Priority Applications (6)

Application Number Priority Date Filing Date Title
EP23170673.0A EP4224333A1 (en) 2019-03-08 2020-02-14 Control system, information processing apparatus, and information processing program
EP20769408.4A EP3937024A4 (en) 2019-03-08 2020-02-14 CONTROL SYSTEM, INFORMATION PROCESSING DEVICE AND INFORMATION PROCESSING PROGRAM
CN202080017521.1A CN113518981A (zh) 2019-03-08 2020-02-14 控制系统、信息处理装置以及信息处理程序
CN202310457195.1A CN116450589A (zh) 2019-03-08 2020-02-14 控制系统、信息处理装置以及记录介质
US17/434,836 US20220147010A1 (en) 2019-03-08 2020-02-14 Control system, information processing apparatus, and information processing program
US17/837,268 US20220299968A1 (en) 2019-03-08 2022-06-10 Control system, information processing apparatus, and information processing program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019-042490 2019-03-08
JP2019042490A JP7014199B2 (ja) 2019-03-08 2019-03-08 制御システム、情報処理装置、および情報処理プログラム

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US17/434,836 A-371-Of-International US20220147010A1 (en) 2019-03-08 2020-02-14 Control system, information processing apparatus, and information processing program
US17/837,268 Continuation US20220299968A1 (en) 2019-03-08 2022-06-10 Control system, information processing apparatus, and information processing program

Publications (1)

Publication Number Publication Date
WO2020184061A1 true WO2020184061A1 (ja) 2020-09-17

Family

ID=72354306

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/005789 WO2020184061A1 (ja) 2019-03-08 2020-02-14 制御システム、情報処理装置、および情報処理プログラム

Country Status (5)

Country Link
US (2) US20220147010A1 (ja)
EP (2) EP3937024A4 (ja)
JP (1) JP7014199B2 (ja)
CN (2) CN113518981A (ja)
WO (1) WO2020184061A1 (ja)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH103303A (ja) * 1996-06-14 1998-01-06 Mitsubishi Electric Corp インターフェース装置
JP2000315167A (ja) * 1999-04-30 2000-11-14 Toshiba Corp データ管理装置、計算機システムおよびプログラムを記憶した記憶媒体
JP2006031214A (ja) * 2004-07-14 2006-02-02 Mitsubishi Electric Corp データ処理装置及びデータ処理方法及びプログラム
WO2013191275A1 (ja) * 2012-06-22 2013-12-27 オムロン株式会社 制御装置
US20150026635A1 (en) * 2013-07-17 2015-01-22 Abb Technology Ag Method for generating control-code by a control-code-diagram
JP2016194808A (ja) 2015-03-31 2016-11-17 オムロン株式会社 プログラマブルロジックコントローラ、データ収集装置、データベースアクセス方法およびデータベースアクセスプログラム

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7188100B2 (en) * 2000-02-25 2007-03-06 Joseph De Bellis Search-on-the-fly report generator
US7136873B2 (en) * 2002-07-20 2006-11-14 Microsoft Corporation Dynamic filtering in a database system
US20040210631A1 (en) * 2003-04-17 2004-10-21 Asher Michael L. Method and apparatus for accessing legacy data in a standardized environment
JP2017016503A (ja) * 2015-07-03 2017-01-19 富士通株式会社 コンパイラ、コンパイル装置及びコンパイル方法
US10445350B2 (en) * 2015-11-15 2019-10-15 Microsoft Technology Licensing, Llc Optimizing content for consistent presentation through collaboration database service
US10545984B2 (en) * 2017-05-23 2020-01-28 Sap Se Abstract default column type in tables
JP7073813B2 (ja) * 2018-03-16 2022-05-24 富士通株式会社 制御プログラム、制御方法および情報処理装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH103303A (ja) * 1996-06-14 1998-01-06 Mitsubishi Electric Corp インターフェース装置
JP2000315167A (ja) * 1999-04-30 2000-11-14 Toshiba Corp データ管理装置、計算機システムおよびプログラムを記憶した記憶媒体
JP2006031214A (ja) * 2004-07-14 2006-02-02 Mitsubishi Electric Corp データ処理装置及びデータ処理方法及びプログラム
WO2013191275A1 (ja) * 2012-06-22 2013-12-27 オムロン株式会社 制御装置
US20150026635A1 (en) * 2013-07-17 2015-01-22 Abb Technology Ag Method for generating control-code by a control-code-diagram
JP2016194808A (ja) 2015-03-31 2016-11-17 オムロン株式会社 プログラマブルロジックコントローラ、データ収集装置、データベースアクセス方法およびデータベースアクセスプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3937024A4

Also Published As

Publication number Publication date
EP3937024A1 (en) 2022-01-12
JP2020144753A (ja) 2020-09-10
EP4224333A1 (en) 2023-08-09
US20220299968A1 (en) 2022-09-22
JP7014199B2 (ja) 2022-02-01
EP3937024A4 (en) 2022-11-09
CN116450589A (zh) 2023-07-18
US20220147010A1 (en) 2022-05-12
CN113518981A (zh) 2021-10-19

Similar Documents

Publication Publication Date Title
EP2804058B1 (en) System and method for emulation of an automation control system
JP2017191386A (ja) 機器保全装置、機器保全方法、機器保全プログラム及び記録媒体
JP6065008B2 (ja) 制御装置
JP6737298B2 (ja) コントローラ、制御方法、および制御プログラム
EP2350859A2 (en) Systems and methods for providing a simulation environment having a simulation user interface
CN111095194B (zh) 控制系统、控制器以及控制方法
JP7063009B2 (ja) 表示装置、画面生成方法、および画面生成プログラム
WO2020184061A1 (ja) 制御システム、情報処理装置、および情報処理プログラム
JP6954191B2 (ja) 制御システム、開発支援装置、および開発支援プログラム
JP5566473B2 (ja) システム設計装置
JP6856153B2 (ja) 機器保全装置、機器保全方法、機器保全プログラム及び記録媒体
JP5492573B2 (ja) トレース機能を備える接続機器シミュレータ装置、方法、及びプログラム
JP7044086B2 (ja) 制御システム、制御方法、および制御プログラム
JP2007172128A (ja) I/oシミュレータ装置
JP2019160348A (ja) 機器保全装置、機器保全方法、機器保全プログラム及び記録媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20769408

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2020769408

Country of ref document: EP