WO2019176486A1 - 制御システム、コントローラ、および制御方法 - Google Patents

制御システム、コントローラ、および制御方法 Download PDF

Info

Publication number
WO2019176486A1
WO2019176486A1 PCT/JP2019/006292 JP2019006292W WO2019176486A1 WO 2019176486 A1 WO2019176486 A1 WO 2019176486A1 JP 2019006292 W JP2019006292 W JP 2019006292W WO 2019176486 A1 WO2019176486 A1 WO 2019176486A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
variable
controller
collected
development
Prior art date
Application number
PCT/JP2019/006292
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 US16/643,546 priority Critical patent/US11281650B2/en
Priority to EP19766954.2A priority patent/EP3767458A4/en
Priority to CN201980004158.7A priority patent/CN111095194B/zh
Publication of WO2019176486A1 publication Critical patent/WO2019176486A1/ja

Links

Images

Classifications

    • 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
    • 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
    • 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/24Querying
    • G06F16/242Query formulation
    • G06F16/2423Interactive query statement specification based on a database schema
    • 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/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • G06F16/2445Data retrieval commands; View definitions
    • 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/24Querying
    • G06F16/245Query processing
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • This disclosure relates to a technique for generating a table on a database accessed by a controller.
  • FA Vectory Automation
  • the FA system is composed of various industrial drive devices.
  • Industrial drive devices include, for example, a moving table for moving a workpiece, a conveyor for conveying the workpiece, an arm robot for moving the workpiece to a predetermined target location, and the like.
  • These drive devices are controlled by an industrial control device (hereinafter also referred to as “controller”) such as a PLC (Programmable Logic Controller) or a robot controller.
  • PLC Programmable Logic Controller
  • Patent Document 1 Japanese Patent Laid-Open No. 2016-194808
  • Patent Document 2 discloses a controller that “when reading data from a database, the number of steps of reading from the database can be reduced as compared with the conventional one”.
  • a table is a model for data management.
  • the table is composed of columns indicating columns and records indicating rows.
  • the user needs to define the attributes of each column in advance in order to generate a table on the database.
  • the user needs to define an identification name (column name) of each column, a data type that can be added to each column, and the like.
  • the user associates the data to be collected in the controller with each column name on the table or is registered in each column. It is necessary to convert the type of data to be collected according to the data type.
  • Such advance setting requires specialized knowledge such as SQL knowledge. Therefore, it is very difficult for a user who lacks expertise to construct a database. Therefore, a technique capable of generating a table on a database without describing a SQL sentence is desired.
  • An example of the present disclosure includes a controller that can access a database, and a development support device configured to be able to communicate with the controller.
  • a development tool for supporting the development of the control program for the controller can be installed in the development support apparatus.
  • the development tool has a setting for specifying a variable to be collected from among variables included in the control program, and a setting for specifying an identification name on the database for each variable to be collected. It is configured to accept as setting information.
  • the controller or the development tool is based on an identification name on the database defined in the setting information received from the development support apparatus and a data type on the database corresponding to the identification name.
  • a generation module for outputting an SQL sentence for generating a table as a storage destination of the variable to be collected on the database.
  • the user can generate a table on the database without describing an SQL sentence.
  • the development tool displays the data type of the variable based on the setting of each variable to be collected.
  • the user can easily confirm the data type of the variable to be collected.
  • the development tool is configured to further accept a setting for designating a primary key from among the variables designated as the collection target.
  • the user can set the primary key without describing the SQL sentence.
  • the development tool when the development tool includes a structure in the variable designated as the collection target, the development tool designates an identification name on the database for each member included in the structure. It is configured to accept.
  • the user can set the member variables included in the structure as collection targets.
  • the generation module generates the SQL statement so as to register the identification name determined for each member of the structure in a table different from the table.
  • the user can manage the member variables included in the structure as a table separate from other variables to be collected.
  • the generation module includes an instruction code for registering the structure identification name in the table as a foreign key in the SQL statement.
  • the user can register the identification name on the database corresponding to the structure as a foreign key without describing the SQL sentence.
  • a controller configured to be able to communicate with a development support apparatus for supporting the development of a control program and capable of accessing a database.
  • a development tool for supporting the development of the control program can be installed in the development support apparatus.
  • the development tool has a setting for specifying a variable to be collected from among variables included in the control program, and a setting for specifying an identification name on the database for each variable to be collected. It is configured to accept as setting information.
  • the controller includes a communication unit for receiving the setting information and the control program from the development support device, and a program execution module for controlling a drive device to be controlled according to the control program received from the development support device.
  • variable of the collection target A generation module for outputting a SQL statement for generating a table as a storage destination on the database.
  • the user can generate a table on the database without describing an SQL sentence.
  • a controller control method configured to be communicable with a development support apparatus for supporting the development of a control program and can access a database.
  • a development tool for supporting the development of the control program can be installed in the development support apparatus.
  • the development tool has a setting for specifying a variable to be collected from among variables included in the control program, and a setting for specifying an identification name on the database for each variable to be collected. It is configured to accept as setting information.
  • the control method includes the steps of receiving the setting information and the control program from the development support device, controlling the drive device to be controlled according to the control program received from the development support device, and from the development support device. Based on the identification name on the database specified in the received setting information and the data type on the database corresponding to the identification name, a table serving as a storage destination of the variable to be collected is Outputting a SQL sentence to be generated on the database.
  • the user can generate a table on the database without describing an SQL sentence.
  • a table can be generated on the database without writing an SQL statement.
  • FIG. 5 is a sequence diagram illustrating a data flow among a development support apparatus, a controller, a drive device, and an external device in the first embodiment.
  • FIG. 10 is a sequence diagram illustrating a data flow among a development support apparatus, a controller, a drive device, and an external device in the second embodiment. It is a figure which shows schematically the production
  • mapping FB which is an example of the mapping module according to 2nd Embodiment.
  • generation FB which is an example of the production
  • generation FB which is an example of the production
  • processing flow which concerns on the table production
  • FIG. 1 is a diagram showing a configuration example of a control system 10 according to the first embodiment.
  • the control system 10 is an FA system for automating the production process.
  • the control system 10 includes one or more development support apparatuses 100, one or more controllers 200, one or more drive devices 300, and one or more external devices 400. Yes.
  • the development support apparatus 100, the controller 200, and the external device 400 are connected to the network NW1.
  • NW1 EtherNET (registered trademark), OPC-UA (Object Linking and Embedding for Process Control Unified Architecture), etc. are adopted.
  • OPC-UA is a communication standard defined to realize data exchange without depending on the type of vendor or OS (Operating System).
  • the development support apparatus 100 is, for example, a notebook or desktop PC (Personal Computer), a tablet terminal, a smartphone, or other information processing apparatus capable of developing a control program for the controller 200.
  • the external device 400 is another DBMS (Database Management System) having a database function.
  • the external device 400 is, for example, a notebook or desktop PC or server.
  • the controller 200 and the driving device 300 are connected to the network NW2.
  • NW2 it is preferable to employ a field network that performs fixed-cycle communication that guarantees the arrival time of data.
  • field networks that perform such periodic communication EtherCAT (registered trademark), EtherNet / IP (registered trademark), registered trademark), and CompoNet (registered trademark) are known.
  • the driving device 300 includes various industrial devices for automating the production process.
  • the driving device 300 includes a robot controller 300A, a servo driver 300B, an arm robot 301A controlled by the robot controller 300A, a servo motor 301B controlled by the servo driver 300B, and the like.
  • the driving device 300 may include a visual sensor for photographing a workpiece, other devices used in the production process, and the like.
  • Development tool 30 can be installed in development support apparatus 100.
  • the development tool 30 is an application for supporting the development of a control program for the controller 200.
  • the development tool 30 is “Sysmac Studio” manufactured by OMRON Corporation.
  • the user can design a control program for the controller 200 on the development tool 30 and install the designed control program as the user program 210 in the controller 200.
  • the user program 210 is sent to the controller 200 as an executable file compiled by the development support apparatus 100.
  • the development tool 30 accepts a selection operation for selecting a variable to be collected from among variables included in the user program 210.
  • the “variable” is an identifier given to data handled in the source code of the user program 210.
  • the “variable” is data representing the state of the controller 200 or the driving device 300.
  • the “variable” refers to data whose value changes in conjunction with the state of each configuration of the controller 200 and the driving device 300.
  • the concept of “variable” may include data representing one value, data represented as an array, data represented as a structure, and various data that can be defined in the user program 210.
  • the variable selected as the collection target is collected during the execution of the user program 210 and is periodically uploaded to the database 430 of the external device 400.
  • the table 432 is a model for data management.
  • the table 432 is represented by a column indicating a column and a record indicating a row. After data is set in each column, the data is uploaded to the table 432 in record units.
  • the designer can perform an operation on the development tool 30 to generate the table 432.
  • the development tool 30 is configured to accept a setting for specifying a variable to be collected from among variables included in the user program 210.
  • the development tool 30 is configured to accept a setting for designating a data type on the database 430 corresponding to the data type of each variable to be collected.
  • the development tool 30 is configured to accept a setting for designating an identification name on the database 430 for each variable to be collected.
  • variables “A” and “B” included in the user program 210 are designated as collection targets.
  • the variable “A” is an “Int” type variable.
  • the variable “B” is a “bool” type variable.
  • the column name “A ′” is designated as the identification name in the database 430 corresponding to the variable “A”.
  • a column name “B ′” is designated as an identification name in the database 430 corresponding to the variable “B”.
  • “Number (10)” is designated as the data type on the database 430 corresponding to the data type “Int” of the variable “A”.
  • “Number (1)” is designated as the data type on the database 430 corresponding to the data type “bool” of the variable “B”.
  • the controller 200 includes a control device 202 and a storage device 208.
  • the control device 202 includes a generation module 250 and a program execution module 252 as functional configurations.
  • the storage device 208 stores the user program 210 and setting information 212 received from the development support device 100.
  • the program execution module 252 starts the execution of the user program 210 based on receiving the execution start command of the user program 210. Thereafter, the program execution module 252 controls the driving device 300 in accordance with a control command defined in the user program 210. The program execution module 252 sequentially updates variable values according to the execution result of the user program 210.
  • the generation module 250 becomes a storage destination of the variable to be collected based on the identification name on the database 430 defined in the setting information 212 and the data type on the database 430 corresponding to the identification name.
  • An SQL statement 230 for generating the table 432 on the database 430 is output.
  • the SQL statement 230 is defined to configure a table 432 including a “Number (10)” type column “A ′” and a “Number (1)” type column “B ′”. ing.
  • the generated SQL statement 230 is transferred to the external device 400.
  • the external device 400 as the DBMS interprets the SQL statement 230 received from the controller 200 and generates a table 432 on the database 430 according to the SQL statement 230.
  • a table 432 including columns “A ′” and “B ′” is generated on the database 430.
  • the development support apparatus 100 has a setting for specifying a variable to be collected and a setting for specifying a data type on the database 430 corresponding to the data type of each variable to be collected. And a setting for designating an identification name on the database 430 for each variable to be collected. Based on these settings, the controller 200 outputs an SQL statement 230 for generating the table 432 on the database 430 to the external device 400. As a result, a table 432 is generated on the database 430 of the external device 400. In this way, the user does not need to describe the SQL statement 230 when generating the table 432. Therefore, even the user who does not have SQL knowledge can easily construct the database 430.
  • the generation module 250 performs various controls in the controller 200 in addition to the variables included in the user program 210.
  • the table 432 may be generated based on variables included in the program.
  • FIG. 1 shows an example in which the user program 210 and the setting information 212 are transferred to the controller 200 as separate data, but the user program 210 and the setting information 212 are transferred as integral data. May be.
  • the setting information 212 may be transferred at the same timing as the user program 210 or may be transferred at a different timing.
  • the database 430 does not necessarily have to exist in the external device 400.
  • the database 430 may exist inside the controller 200.
  • the database 430 may exist in another unit connected to the internal bus of the controller 200.
  • FIG. 2 is a sequence diagram illustrating a data flow among the development support apparatus 100, the controller 200, the driving device 300, and the external device 400.
  • step S10 it is assumed that the development support apparatus 100 receives an activation command for the development tool 30. Based on this, the development support apparatus 100 displays a program design screen.
  • FIG. 3 is a diagram showing a program design screen 31 which is an example of a user interface provided by the development tool 30.
  • the program design screen 31 is displayed on the display unit 121 of the development support apparatus 100, for example.
  • the user program 210 can be written in any programming language.
  • the user program 210 may be defined by a ladder diagram (LD: Ladder Diagram), an instruction list (IL: Instruction List), a structured text (ST: Structured Text), and a sequential function chart (SFC). : Sequential Function Chart) or a combination of these.
  • the user program 210 may be defined in a general-purpose programming language such as JavaScript (registered trademark) or C language.
  • the user program 210 is described by a ladder diagram.
  • the designer can design a user program 210 that is suitable for the drive device 300 to be controlled by combining arbitrary function blocks or defining input / output relationships of variables and function blocks. it can.
  • the function block is a function that is repeatedly used in the user program 210 as a component.
  • the user program 210 includes variables A to C and function blocks FB1 and FB2.
  • the function block FA1 executes a predetermined function defined in the function block FB1 based on the value of the variable A associated with the input unit.
  • the execution result is reflected in the variable B associated with the output unit of the function block FA1.
  • the function block FB2 executes a predetermined function defined in the function block FB2 based on the value of the variable B associated with the input unit.
  • the execution result is reflected in the variable C associated with the output unit of the function block FA2.
  • step S14 the development tool 30 accepts a table setting screen call operation related to table generation. Based on this, the development tool 30 displays a table setting screen.
  • FIG. 4 is a diagram showing a table setting screen 33 which is an example of a user interface provided by the development tool 30.
  • the table setting screen 33 accepts various settings for table generation.
  • the table setting screen 33 includes a database connection information setting field 35, a table name setting field 36, a setting field 41 for specifying a variable to be collected, and a collection target field.
  • a display field 42 for displaying the data type of the variable, a setting field 45 for designating the identification name of the data on the database, a setting field 46 for designating the data type on the database,
  • a setting field 50 for designating a primary key and a setting field 51 for designating permission / prohibition of null designation are included.
  • the setting column 35 accepts designation of connection information to the database.
  • Each connection information is set in advance by a user or the like.
  • the connection information defines a connection name, a database type to be connected, a connection destination address database name, a user name, a password, and the like.
  • a list of database types defined in each connection information is displayed. Examples of the database type include “Oracle Database”, “SQL Server”, “MySQL (registered trademark)”, “Firebird”, “DB2 (registered trademark)”, “PostgreSQL”, and the like.
  • the user can specify connection information to the database by selecting one database type from the list of database types.
  • the setting column 36 receives an input of a table name for the table 432 to be generated.
  • the setting field 36 is, for example, a text box, and the table name is set by character input. In the example of FIG. 4, “TABLE1” is set as the table name.
  • the setting column 41 accepts designation of variables to be collected.
  • a list of structure names (variable names) defined in the user program 210 is displayed.
  • the structure names displayed in a list may be registered in advance by the user, or may be automatically extracted from the user program 210.
  • the user can designate a variable included in the structure as a collection target by selecting one structure name from the list of structure names.
  • the display column 42 displays the data type of each variable to be collected set in the setting column 41.
  • the data type corresponding to each variable is set, for example, when a variable is registered on the above-described program design screen 31 (see FIG. 3), and at this setting, the correspondence between the variable and the data type is saved.
  • the development tool 30 Based on the fact that the variable to be collected is selected in the setting column 41, the development tool 30 identifies the data type corresponding to the selected variable from the correspondence relationship between the variable and the data type, and sets the data type to the data type. Display side by side in a variable.
  • the setting column 45 accepts a setting for designating an identification name on the database 430 for each variable to be collected set in the setting column 41.
  • the identification name set in the setting field 45 is the column name of the table.
  • the setting field 45 is, for example, a text box, and the user can set a column name corresponding to each variable by inputting characters in each text box.
  • table column names are determined automatically.
  • the column name is determined to be the same as the variable name.
  • the column name is determined by adding a predetermined keyword to the variable name.
  • the setting column 46 receives a setting for designating a data type on the database 430 for each variable set in the setting column 41.
  • a setting for designating a data type on the database 430 for each variable set in the setting column 41 As an example, when the user presses the button 46A, a list of data types that can be set is displayed. The user can specify a data type on the database 430 by selecting one data type from the list of data types.
  • the data type on the database 430 is automatically determined. More specifically, the correspondence between each data type that can be used in the user program 210 and the data type on the database 430 is defined in advance.
  • the development tool 30 specifies the data type on the database 430 corresponding to the data type of each variable to be collected based on the correspondence relationship, and displays the data type in the setting column 46. In this case, the user does not need to set the data type in the setting field 46.
  • the setting column 50 receives a setting for designating a variable regarded as a primary key on the table 432.
  • the primary key is for uniquely identifying a record in the table 432. For variables set as primary keys, data duplication is not allowed.
  • the setting mode of the primary key “YES” and “NO” are displayed when the user presses the button 50A.
  • the column for which “YES” is selected is set as the primary key.
  • a column for which “NO” is selected is not set as a primary key.
  • the setting column 51 accepts a setting as to whether or not to allow NULL input for each column.
  • the setting mode “YES” and “NO” are displayed when the user presses the button 51A. For columns for which “YES” is selected, NULL input is prohibited. For columns for which “NO” is selected, NULL input is allowed.
  • the development support apparatus 100 transfers the table setting performed on the table setting screen 33 to the controller 200 as setting information 212.
  • the cancel button 59 on the table setting screen 33 is pressed, the development support apparatus 100 closes the table setting screen 33 without transferring the table settings set on the table setting screen 33.
  • step S20 the development support apparatus 100 transfers the table setting performed on the table setting screen 33 to the controller 200 as setting information 212.
  • step S22 the generation module 250 of the controller 200 generates an SQL statement 230 (see FIG. 1) for table generation based on the reception of the setting information 212 from the development support apparatus 100.
  • the SQL statement 230 may be generated by the development tool 30.
  • FIG. 5 is a diagram schematically illustrating the generation process of the SQL sentence 230.
  • the generation module 250 generates the SQL statement 230 with the setting information 212 as an input. More specifically, the generation module 250 refers to the table name “TABLE1” included in the setting information 212 and reflects the description “Create Table TABLE1” in the SQL statement 230. With this description, the table name of the generated table 432 is “TABLE1”.
  • the generation module 250 determines “A ′” based on the identification name “A ′” included in the setting information 212 and the data type “Number (10)” associated with the identification name “A ′”.
  • the description “Number (10)” is reflected in the SQL statement 230.
  • the column of the identification name “A ′” is added to the table 432.
  • the description “NOT NULL” is reflected in the SQL sentence 230.
  • the generation module 250 reflects the description for adding the columns of the identification names “B ′” to “F ′” in the SQL statement 230.
  • the generation module 250 sets “PRIMARY KEY (A ′, B ′)”. Is added to the SQL statement 230. With this description, columns of identification names “A ′” and “B ′” are set as primary keys.
  • the generated SQL sentence 230 is transmitted to the external device 400.
  • the external device 400 generates a table 432 according to the SQL statement 230 received from the controller 200.
  • FIG. 6 is a diagram showing a data structure of the table 432 generated according to the SQL statement 230 shown in FIG. As shown in FIG. 6, the table 432 includes columns of identification names “A ′” to “F ′”. The “*” mark represents the primary key. In the example of FIG. 6, columns “A ′” and “B ′” are shown as primary keys.
  • step S30 it is assumed that the development tool 30 accepts a compilation operation in step S30. Based on this, the development tool 30 compiles the user program 210 designed on the program design screen 31. Thereafter, it is assumed that the development tool 30 accepts a download operation of the compilation result. Based on this, the development tool 30 transfers the compiled user program 210 to the controller 200. The controller 200 stores the received user program 210 in the storage device 208 (see FIG. 1).
  • step S32 it is assumed that the controller 200 receives an execution instruction of the user program 210. Based on this, the controller 200 starts executing the user program 210.
  • the controller 200 When the user program 210 is a cyclic execution type program, the controller 200 repeatedly executes a command group included in the user program 210 for each predetermined control cycle. More specifically, the controller 200 executes the first row to the last row of the user program 210 in one control cycle. In the next control cycle, the controller 200 executes the first line to the last line of the user program 210 again.
  • the controller 200 generates a command value for each control cycle and outputs the command value to the driving device 300.
  • step S50 the controller 200 determines whether or not an execution command for command value generation processing defined in the user program 210 has been received.
  • controller 200 determines that the execution command has been received (YES in step S50)
  • it generates a command value in accordance with the specified command and sends the command value to drive device 300 (step S52).
  • the driving device 300 drives the control target according to the command value received from the controller 200.
  • controller 200 does not determine that the execution command for the command value generation process has been received (NO in step S50)
  • controller 200 switches the control to step S60 without executing the process of step S52.
  • step S60 the controller 200 determines whether or not an execution command for uploading a variable to be collected has been received.
  • controller 200 determines that the execution instruction has been received (YES in step S60)
  • it generates an SQL statement for executing the INSERT instruction.
  • information for example, a table name
  • a value of data to be uploaded to each column, and the like are defined.
  • step S62 the controller 200 sends the generated SQL statement to the external device 400.
  • the external device 400 generates a record reflecting the variable value in each column according to the SQL statement received from the controller 200, and adds the generated record to the table 432 generated in step S24. As a result, the variable to be collected is reflected in the table 432. Thereafter, the external device 400 transmits an upload result indicating normal end or abnormal end to the controller 200.
  • step S60 If the controller 200 has not received the execution instruction for the upload process of the variable to be collected (NO in step S60), the controller 200 switches the process to step S70 without executing the process of step S62.
  • step S70 the controller 200 determines whether or not to end the execution of the user program 210.
  • the termination command is issued based on, for example, receiving a termination operation from the user.
  • controller 200 determines that an end operation has been received from the user (YES in step S70)
  • controller 200 ends the execution of user program 210. If not (NO in step S70), controller 200 returns control to step S50.
  • the external device 400 In the above description, an example in which the SQL statement of the INSERT command is transmitted from the controller 200 to the database 430 of the external device 400 in step S62 has been described. May be sent.
  • the external device 400 generates an SQL statement of the INSERT command based on the reception of the value to be inserted, and executes the INSERT processing of the received value based on the SQL statement.
  • a variable to be collected may include a structure.
  • the generation module 250 When a structure is included in the variable to be collected, the generation module 250 generates the SQL statement 230 for table generation in a different manner from the case where the structure is not included. For example, two generation patterns (generation patterns 1 and 2) are conceivable as generation processing of the table 432 in the case where a structure is included in the variable to be collected.
  • the generation module 250 In the generation pattern 1, the generation module 250 generates a table for managing variables that are not structures and a table for managing member variables included in the structures separately. In the generation pattern 2, the generation module 250 generates one table for commonly managing variables that are not structures and member variables included in the structures.
  • FIG. 7 schematically shows a generation pattern 1 of the table according to the first embodiment.
  • the development tool 30 When the development tool 30 (see FIG. 4) includes a structure in a variable designated as a collection target, the development tool 30 (see FIG. 4) also applies data to each member included in the structure as well as a variable that is not a structure.
  • the designation of the data type on the base 430 and the designation of the identification name on the database 430 are accepted.
  • the structure “C” is designated as a collection target in the table setting screen 33 (see FIG. 4).
  • the user also sets the data types on the database 430 for the member variables “ ⁇ ”, “ ⁇ ”, and “ ⁇ ”. And the designation of the identification name (column name) on the database 430 are accepted.
  • the column “ ⁇ ′” of the data type “Number (5)” is set for the member variable “ ⁇ ”
  • the column “ ⁇ ” of the data type “Number (5)” is set for the member variable “ ⁇ ”.
  • the column “ ⁇ ′” of the data type “Number (5)” is set for the member variable “ ⁇ ”.
  • setting information 212 shown in FIG. 7 is generated.
  • the generation module 250 of the controller 200 receives the setting information 212 as an input, and registers the identification name determined for each member of the structure in another table. Generate a statement.
  • the generation module 250 receives the setting information 212 and generates an SQL statement 230A for generating “TABLE1” and an SQL statement 230B for generating “TABLE2”.
  • the generation module 250 based on the identification name “A ′” included in the setting information 212 and the data type “Number (10)” associated with the identification name “A ′”, The statement “A 'Number (10)” is reflected in the SQL statement 230A. With this description, the column of the identification name “A ′” is added to the table. In addition, since the NULL designation is prohibited for the identification name “A ′”, the description “NOT NULL” is reflected in the SQL sentence 230A. Similarly, the generation module 250 reflects the description for adding the column of the identification name “B ′” in the SQL sentence 230A.
  • the generation module 250 newly generates a column name “C ′” corresponding to the structure name.
  • the column name “C ′” may be the same as or different from the structure name.
  • the generation module 250 reflects the description “C ′ Number (5)” in the SQL statement 230A. Thereby, the column of the identification name “C ′” is added to the table.
  • the generation module 250 includes an instruction code for registering the column name of the structure in the table as a foreign key in the SQL statement 230A.
  • the description “FOREIGN KEY (C ′) REFERENCES TABLE2” is added to the SQL statement 230A.
  • the column “C ′” is defined as a foreign key referring to “TABLE2”.
  • the generation module 250 sets the columns “C ′”, “ ⁇ ′”, “ ⁇ ′”, “ ⁇ ” for the member variables “ ⁇ ”, “ ⁇ ”, “ ⁇ ” included in the structure “C”.
  • a description for adding “” is reflected in the SQL sentence 230B different from the SQL sentence 230A.
  • columns of identification names “C ′”, “ ⁇ ′”, “ ⁇ ′”, and “ ⁇ ′” are added to another table.
  • FIG. 8 is a diagram showing a data structure of the table 432A generated according to the SQL statement 230A shown in FIG. 7 and the table 432B generated according to the SQL statement 230B shown in FIG.
  • the table 432A includes columns of identification names “A ′”, “B ′”, and “C ′”.
  • the “*” mark represents the primary key.
  • columns “A ′” and “B ′” are shown as primary keys.
  • the column “C ′” refers to the external “TABLE 2”.
  • the table 432B includes columns of identification names “C ′”, “ ⁇ ′”, “ ⁇ ′”, and “ ⁇ ′”.
  • the “*” mark represents the primary key.
  • the column “C ′” is shown as the primary key.
  • the generation module 250 separately generates a table 432A for managing variables that are not structures and a table 432B for managing member variables included in the structures.
  • variable to be collected includes a plurality of structures
  • the structure An SQL statement is generated so that a table is generated according to the number of fields.
  • an SQL statement is generated so that a table is generated for each structure.
  • the name of the structure is registered as the external key of the table 432A and the primary key of the table 432B.
  • the structure name is not necessarily registered as the foreign key of the table 432A and the primary key of the table 432B.
  • one or more members of the structure may be registered as a foreign key of table 432A and a primary key of table 432B.
  • the member “C. ⁇ ” of the structure “C” is registered as a foreign key of the table 432A and registered as a primary key of the table 432B. In this case, the structure “C” itself does not need to be registered as a column of the tables 432A and 432B.
  • FIG. 9 schematically shows table generation pattern 2 according to the first embodiment.
  • the generation module 250 of the controller 200 generates the SQL statement 230 with the setting information 212 as an input.
  • the structure “C” is defined in the setting information 212 as a variable to be collected.
  • the structure “C” includes variables “ ⁇ ”, “ ⁇ ”, and “ ⁇ ” as member variables.
  • the generation module 250 generates one table 432 for commonly managing variables that are not structures and member variables included in the structures.
  • the generation module 250 based on the identification name “A ′” included in the setting information 212 and the data type “Number (10)” associated with the identification name “A ′”, The statement “A 'Number (10)” is reflected in the SQL statement 230. With this description, the column of the identification name “A ′” is added to the table 432. Also, since the NULL designation is prohibited for the identification name “A ′”, the description “NOT NULL” is reflected in the SQL sentence 230. Similarly, the generation module 250 reflects the description for adding the column of the identification name “B ′” in the SQL statement 230.
  • the generation module 250 like the variables “A”, “B”, has the identification names “ ⁇ ′”, “ ⁇ The description for adding the columns “” and “ ⁇ ” is reflected in the SQL statement 230.
  • FIG. 10 is a diagram showing the data structure of the table 432 generated from the SQL statement 230 shown in FIG.
  • the table 432 includes columns of identification names “A ′”, “B ′”, “C ′”, “ ⁇ ′”, “ ⁇ ′”, and “ ⁇ ′”.
  • the “*” mark represents the primary key.
  • columns “A ′” and “B ′” are shown as primary keys.
  • the generation module 250 generates one table 432 for commonly managing variables that are not structures and member variables included in the structures.
  • FIG. 11 is a schematic diagram illustrating a hardware configuration of the development support apparatus 100.
  • the development support apparatus 100 includes, for example, a computer configured according to a general-purpose computer architecture.
  • the development support apparatus 100 includes a control device 102 such as a CPU (Central Processing Unit) and an MPU (Micro-Processing Unit), a main memory 104, a nonvolatile storage device 110, a communication interface 111, and an I / O (Input / Output). / Output) interface 114 and display interface 120. These components are communicably connected to each other via an internal bus 125.
  • the control device 102 implements various processes in the development tool 30 by expanding and executing the development support program 110A stored in the storage device 110 in the main memory 104.
  • the development support program 110 ⁇ / b> A is a program for providing a development environment for the user program 210.
  • the storage device 110 stores various data generated by the development tool 30 in addition to the development support program 110A.
  • the data includes, for example, the above-described user program 210 designed on the development tool 30, the above-described setting information 212, and the like.
  • the communication interface 111 exchanges data with other communication devices via a network.
  • the other communication devices include, for example, a controller 200, an external device 400, a server, and the like.
  • the development support apparatus 100 may be configured to download various programs such as the development support program 110A from the other communication device via the communication interface 111.
  • the I / O interface 114 is connected to the operation unit 115 and takes in a signal indicating a user operation from the operation unit 115.
  • the operation unit 115 typically includes a keyboard, a mouse, a touch panel, a touch pad, and the like, and accepts an operation from the user.
  • the display interface 120 is connected to the display unit 121 and transmits an image signal for displaying an image to the display unit 121 in accordance with a command from the control device 102 or the like.
  • the display unit 121 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 development tool 30 can be displayed on the display unit 121.
  • the development support apparatus 100 and the display unit 121 are shown as separate bodies, but the development support apparatus 100 and the display unit 121 may be integrally configured.
  • FIG. 12 is a schematic diagram illustrating an example of a hardware configuration of the controller 200.
  • the controller 200 includes a communication interface 201, a control device 202 such as a CPU and an MPU, a chip set 204, a main memory 206, a nonvolatile storage device 208, an internal bus controller 222, a field bus controller 224, a memory Card interface 239.
  • the control device 202 reads out the control program 211 stored in the storage device 208, develops it in the main memory 206, and executes it, thereby realizing arbitrary control over the robot controller 300A, the servo driver 300B, and the like.
  • the control program 211 includes various programs for controlling the controller 200.
  • the control program 211 includes a system program 209, a user program 210, and the like.
  • the system program 209 includes instruction codes for providing basic functions of the controller 200 such as data input / output processing and execution timing control.
  • the user program 210 is downloaded from the development support apparatus 100.
  • the user program 210 is arbitrarily designed according to the control target, and includes a sequence program 210A for executing sequence control and a motion program 210B for executing motion control.
  • the chipset 204 realizes processing as the entire controller 200 by controlling each component.
  • the storage device 208 stores various data in addition to the control program 211.
  • the storage device 208 stores the setting information 212 and the data type correspondence 213 described above. Details of the data type correspondence 213 will be described later in a “second embodiment”.
  • the internal bus controller 222 is an interface for exchanging data with various devices connected to the controller 200 through the internal bus. As an example of such a device, an I / O unit 226 is connected.
  • the field bus controller 224 is an interface for exchanging data with various drive devices 300 connected to the controller 200 through the field bus.
  • a robot controller 300A and a servo driver 300B are connected.
  • a driving device such as a visual sensor may be connected.
  • the internal bus controller 222 and the field bus controller 224 can give arbitrary commands to connected devices and can acquire arbitrary data managed by the devices.
  • the internal bus controller 222 and / or the field bus controller 224 also functions as an interface for exchanging data with the robot controller 300A and the servo driver 300B.
  • the communication interface 201 controls data exchange through various wired / wireless networks.
  • the controller 200 communicates with the development support apparatus 100 and the external device 400 via the communication interface 201.
  • the controller 200 can access the database 430 on the external device 400 via the communication interface 201.
  • the memory card interface 239 is configured to be detachable from a memory card 240 (for example, an SD card) that is an example of an external storage medium, and writes data to the memory card 240 and reads data from the memory card 240. Is possible.
  • a memory card 240 for example, an SD card
  • the memory card interface 239 is configured to be detachable from a memory card 240 (for example, an SD card) that is an example of an external storage medium, and writes data to the memory card 240 and reads data from the memory card 240. Is possible.
  • FIG. 13 is a block diagram illustrating a hardware configuration of the external device 400.
  • the external device 400 has a hardware configuration having a general-purpose architecture. That is, the external device 400 is implemented as a kind of personal computer. However, the external device 400 may be mounted using dedicated hardware instead of general-purpose hardware.
  • the external device 400 includes a control device 402 such as a CPU or MPU, a main memory 404, a nonvolatile storage device 410, a communication interface 412, an I / O interface 414, a display interface 420, including. These components are connected to each other via an internal bus 425 so that data communication is possible.
  • the control device 402 controls the external device 400 by reading out a control program (not shown) stored in the storage device 410, developing it in the main memory 404, and executing it.
  • the control device 402 implements a control unit that executes control calculations by linking with the main memory 404 and the storage device 410.
  • the communication interface 412, the I / O interface 414, and the fieldbus interface 416 mediate exchange of data between the external device 400 and other communication devices.
  • the communication interface 412 mediates communication with the controller 200 via the network NW1 (see FIG. 1) or the like.
  • the communication interface 412 for example, a component capable of communication according to EtherNET can be employed.
  • the I / O interface 414 is connected to the operation unit 415 and takes in a signal indicating a user operation from the operation unit 415.
  • the operation unit 415 typically includes a keyboard, a mouse, a touch panel, a touch pad, and the like, and receives an operation from the user.
  • the display interface 420 is connected to the display unit 421 and transmits an image signal for displaying an image to the display unit 421 in accordance with a command from the control device 402 or the like.
  • the display unit 421 includes an LCD or an organic EL display, and presents various information to the user.
  • the external device 400 and the display unit 421 are shown as separate bodies, but the external device 400 and the display unit 421 may be configured integrally.
  • the development support apparatus 100 specifies the setting for specifying the variable to be collected and the data type on the database 430 corresponding to the data type of each variable to be collected. And a setting for designating an identification name on the database 430 for each variable to be collected. These settings are transferred from the development support apparatus 100 to the controller 200 as setting information 212.
  • the controller 200 creates a table 432 based on the identification name on the database 430 specified in the setting information 212 received from the development support apparatus 100 and the data type on the database 430 corresponding to the identification name.
  • the SQL statement 230 to be generated on the database 430 is output to the external device 400.
  • the table 432 is automatically generated on the database 430 of the external device 400.
  • the user can generate the table 432 on the database 430 by specifying the variable to be collected and the data type on the database 430 corresponding to the data type of each variable. Therefore, the user does not need to describe the SQL statement 230 when generating the table 432. Therefore, the database 430 can be easily constructed even by a user who does not have knowledge of SQL.
  • the present embodiment includes the following disclosure.
  • a controller (200) capable of accessing a database (430);
  • a development support device (100) configured to be communicable with the controller (200),
  • a development tool (30) for supporting development of a control program of the controller (200) can be installed in the development support apparatus (100),
  • the development tool (30) specifies a setting for specifying a variable to be collected from among variables included in the control program, and specifies an identification name on the database (430) for each variable to be collected.
  • the controller (200) or the development tool (30) includes an identification name on the database (430) defined in the setting information (212) received from the development support apparatus (100), and the identification name
  • An SQL statement for generating a table (432) on the database (430) to be a storage destination of the variable to be collected is output based on the data type on the database (430) corresponding to A control system including a generation module (250) for performing.
  • a controller (200) configured to be able to communicate with a development support device (100) for supporting the development of a control program and capable of accessing a database (430),
  • a development tool (30) for supporting development of the control program can be installed in the development support device (100),
  • the development tool (30) specifies a setting for specifying a variable to be collected from among variables included in the control program, and specifies an identification name on the database (430) for each variable to be collected.
  • the controller (200) A communication unit for receiving the setting information (212) and the control program from the development support device (100); A program execution module for controlling a drive device to be controlled in accordance with the control program received from the development support apparatus (100); The identification name on the database (430) defined in the setting information (212) received from the development support apparatus (100) and the data type on the database (430) corresponding to the identification name And a generation module (250) for outputting a SQL statement for generating a table (432) serving as a storage destination of the variable to be collected on the database (430).
  • a control method of a controller (200) configured to be able to communicate with a development support apparatus (100) for supporting development of a control program and capable of accessing a database (430),
  • a development tool (30) for supporting development of the control program can be installed in the development support device (100),
  • the development tool (30) specifies a setting for specifying a variable to be collected from among variables included in the control program, and specifies an identification name on the database (430) for each variable to be collected.
  • the control method is: Receiving the setting information (212) and the control program from the development support apparatus (100); Controlling a drive device to be controlled according to the control program received from the development support apparatus (100); The identification name on the database (430) defined in the setting information (212) received from the development support apparatus (100) and the data type on the database (430) corresponding to the identification name And a step of outputting an SQL statement for generating a table (432) as a storage destination of the variable to be collected on the database (430) based on the above.
  • ⁇ Second Embodiment >> ⁇ G. Overview>
  • the user performs setting for generating the table 432 on the table setting screen 33, and the SQL statement 230 for table generation is generated according to the setting.
  • a function for generating the SQL statement 230 is provided as a function module that can be incorporated into the user program 210. That is, the user can use the function module in combination with another function module on the program design screen 31 (see FIG. 3).
  • FIG. 14 is a diagram showing a configuration example of the control system 10 according to the second embodiment.
  • the control system 10 includes one or more development support apparatuses 100, one or more controllers 200, one or more drive devices 300, and one or more external devices 400.
  • the controller 200 includes a control device 202 and a storage device 208 as hardware configurations.
  • the control device 202 includes a program execution module 252 as a functional configuration.
  • a function for generating the SQL statement 230 is provided as a function module such as a function block.
  • the function module is shown as the generation module 250.
  • the user can use the generation module 250 in combination with other function modules on the program design screen 31 (see FIG. 3).
  • the development support apparatus 100 transfers the user program 210 in which the generation module 250 is incorporated to the controller 200 based on the reception of the download operation.
  • the controller 200 stores the user program 210 received from the development support apparatus 100 in the storage device 208.
  • the program execution module 252 starts the execution of the user program 210 based on receiving the execution start command of the user program 210.
  • the program execution module 252 executes the generation function of the SQL statement 230 by the generation module 250 based on the arrival of the execution timing of the generation module 250.
  • FIG. 15 is a diagram schematically illustrating the generation process of the SQL sentence 230 by the generation module 250.
  • the generation module 250 receives the correspondence relationship 213 stored in the storage device 208 and the collection target variable 229 and generates the SQL statement 230.
  • the correspondence 213 defines the correspondence between the data type that can be used by the user program 210 and the data type that can be used by the database 430.
  • the correspondence relationship 213 may be defined in advance or may be arbitrarily edited by the user. Typically, the correspondence 213 is downloaded from the server as needed.
  • the collection target variable 229 is designated as a collection target on the user program 210 designed on the above-described program design screen 31 (see FIG. 3).
  • variables “A” to “F” are designated as collection targets.
  • the generation module 250 determines an identification name on the database 430 for each variable to be collected. In one aspect, the generation module 250 determines the identifier name to be the same as the variable name. In another aspect, the generation module 250 determines a variable name to which a predetermined keyword is added as an identification name. As an example, it is assumed that the identification names on the database 430 for the variables “A” to “F” are determined as the column names “A ′” to “F ′”. In addition, the determination method of a column name is not limited to these, Arbitrary determination methods may be employ
  • the generation module 250 specifies, for each variable to be collected, a data type on the database 430 corresponding to the data type of the variable based on the correspondence 213.
  • the “Number (10)” type is specified as the corresponding data type.
  • the “nchar (127)” type is specified as the corresponding data type.
  • the “C” of the “Int” type the “Number (5)” type is specified as the corresponding data type.
  • the “Number (19)” type is specified as the corresponding data type.
  • the “bool” type variable “E” the “Number (1)” type is specified as the corresponding data type.
  • the “TIMESTAMP” type is specified as the corresponding data type.
  • the generation module 250 generates the SQL statement 230 based on the identification name determined for each variable to be collected and the data type on the database 430 specified for each variable to be collected. More specifically, the generation module 250 has the identification name “A ′” specified for the variable “A” and the data type “Number (10)” on the database 430 specified for the variable “A”. Based on the above, the description “A ′ Number (10)” is reflected in the SQL statement 230. With this description, the column of the identification name “A ′” is added to the table 432. Similarly, the generation module 250 reflects the description for adding the columns of the identification names “B ′” to “F ′” in the SQL statement 230.
  • the generated SQL statement 230 is transferred to the external device 400.
  • the external device 400 as the DBMS interprets the SQL statement 230 received from the controller 200 and generates a table 432 on the database 430 according to the SQL statement 230.
  • the SQL statement 230 for table generation is automatically generated.
  • the user can generate the table 432 having the variables to be collected as elements only by assembling the user program 210 so that the variables to be collected are input to the generation module 250.
  • the user can generate the table 432 on the database 430 without describing the SQL sentence.
  • the table 432 is generated based on the variables included in the user program 210 has been described. However, in addition to the user program 210, the table based on the variables included in various control programs in the controller 200 is also described. 432 may be generated.
  • the database 430 does not necessarily have to exist in the external device 400.
  • the database 430 may exist inside the controller 200.
  • the database 430 may exist in another unit connected to the internal bus of the controller 200.
  • the data type on the user program 210 and the data type on the database 430 are associated one-to-one has been described.
  • the data type on the user program 210 and the data type on the database 430 may be associated with 1 to N ( ⁇ 2).
  • FIG. 16 is a sequence diagram illustrating a data flow among the development support apparatus 100, the controller 200, the driving device 300, and the external device 400 according to the second embodiment.
  • step S10 it is assumed that the development support apparatus 100 receives an activation command for the development tool 30. Based on this, the development support apparatus 100 displays the above-described program design screen 31 (see FIG. 3). Since the program design screen 31 is as described in FIG. 3, the description thereof will not be repeated. The designer can incorporate a generation module 250 for table generation into the user program 210 on the program design screen 31.
  • step S30 it is assumed that the development tool 30 receives a compile operation. Based on this, the development tool 30 compiles the user program 210 designed on the program design screen 31. Thereafter, it is assumed that the development tool 30 accepts a download operation of the compilation result. Based on this, the development tool 30 transfers the compiled user program 210 to the controller 200. The controller 200 stores the received user program 210 in the storage device 208 (see FIG. 14).
  • step S32 it is assumed that the controller 200 receives an execution instruction of the user program 210. Based on this, the controller 200 starts executing the user program 210.
  • the controller 200 When the user program 210 is a cyclic execution type program, the controller 200 repeatedly executes a command group included in the user program 210 for each predetermined control cycle. More specifically, the controller 200 executes the first row to the last row of the user program 210 in one control cycle. In the next control cycle, the controller 200 executes the first line to the last line of the user program 210 again.
  • the controller 200 generates a command value for each control cycle and outputs the command value to the driving device 300.
  • step S40 the controller 200 determines whether or not an execution instruction for table generation processing has been received.
  • the controller 200 determines that an execution instruction for table generation processing has been received.
  • controller 200 determines that generation module 250 has been executed (YES in step S40)
  • controller 200 switches control to step S42. Otherwise (NO in step S40), controller 200 switches control to step S50.
  • step S42 the generation module 250 of the controller 200 generates an SQL statement 230 for table generation.
  • the SQL statement 230 may be generated by the development tool 30.
  • FIG. 17 is a diagram schematically illustrating a generation process of the SQL sentence 230 according to the second embodiment.
  • the generation module 250 of the controller 200 receives the above-described correspondence 213 (see FIG. 15), the above-described collection target variable 229 (see FIG. 15), and other various settings as inputs.
  • An SQL statement 230 is generated.
  • the generation module 250 determines an identification name on the database 430 for each variable to be collected. For example, it is assumed that the generation module 250 determines column names “A ′” to “F ′” as identification names on the database 430 for the variables “A” to “F”. In one aspect, the generation module 250 determines the same name as the variable name of each variable to be collected as an identification name on the database 430. In this case, the column names “A ′” to “F ′” are the same as the variable names “A” to “F”, respectively. In another aspect, the generation module 250 determines a name including a variable name of each variable to be collected as the identification name on the database 430.
  • the column names “A ′” to “F ′” are obtained by adding predetermined keywords to the variable names “A” to “F”, respectively. Since the variable name is represented by the identification name on the database 430, the user can easily grasp the column corresponding to each variable.
  • the generation module 250 identifies the corresponding data type on the database 430 for each variable to be collected based on the correspondence relationship 213.
  • the generation module 250 generates the SQL statement 230 based on the identification name determined for each variable to be collected and the data type on the database 430 specified for each variable to be collected. More specifically, the generation module 250 has the identification name “A ′” specified for the variable “A” and the data type “Number (10)” on the database 430 specified for the variable “A”. Based on the above, the description “A ′ Number (10)” is reflected in the SQL statement 230. With this description, the column of the identification name “A ′” is added to the table 432. Similarly, the generation module 250 reflects the description for adding the columns of the identification names “B ′” to “F ′” in the SQL statement 230.
  • the generation module 250 reflects various settings that are input to the SQL statement 230.
  • the various settings include setting of a table name given to a generated table, setting of a column designated as a primary key, and setting of whether to allow NULL input to each column. .
  • the generation module 250 reflects the description “Create Table TABLE1” in the SQL statement 230. With this description, the table name of the generated table 432 is “TABLE1”.
  • variables “A” and “B” are set as primary keys.
  • the generation module 250 adds a description “PRIMARY KEY (A ′, B ′)” to the SQL statement 230.
  • the column “A ′” corresponding to the variable “A” and the column “B ′” corresponding to the variable “B” are set as primary keys.
  • the SQL statement 230 includes a command statement for registering in the table using the identification name in the database corresponding to the designated variable as the primary key.
  • NULL prohibition is set for variables “A” and “B”.
  • the generation module 250 adds “NOT NULL” to the columns “A ′” and “B ′”.
  • NULL designation is prohibited for the columns “A ′” and “B ′” corresponding to the variables “A” and “B”.
  • the generation module 250 automatically generates the SQL statement 230 for table generation.
  • the generation module 250 further outputs a mapping table 232 that is an association result in addition to the SQL statement 230.
  • mapping table 232 indicates the correspondence result of the variable data type, the identification name on the database 430, and the data type on the database 430 for each variable to be collected.
  • mapping table 232 further includes a flag indicating whether any column is set as a primary key and a flag indicating whether NULL designation for each column is prohibited.
  • the generated SQL sentence 230 is transmitted to the external device 400.
  • the external device 400 generates a table 432 according to the SQL statement 230 based on the reception of the SQL statement 230 from the controller 200.
  • the empty table 432 shown in FIG. 6 is generated on the database 430.
  • step S50 the controller 200 determines whether or not an execution command for command value generation processing defined in the user program 210 has been received.
  • controller 200 determines that the execution command has been received (YES in step S50)
  • it generates a command value in accordance with the specified command and sends the command value to drive device 300 (step S52).
  • the driving device 300 drives the control target according to the command value received from the controller 200.
  • controller 200 does not determine that the execution command for the command value generation process has been received (NO in step S50)
  • controller 200 switches the control to step S60 without executing the process of step S52.
  • step S60 the controller 200 determines whether or not an execution command for uploading a variable to be collected has been received.
  • controller 200 determines that the execution instruction has been received (YES in step S60)
  • it generates an SQL statement for executing the INSERT instruction.
  • information for example, a table name
  • a value of data to be uploaded to each column, and the like are defined.
  • step S62 the controller 200 sends the generated SQL statement to the external device 400.
  • the external device 400 generates a record reflecting the variable value in each column according to the SQL statement received from the controller 200, and adds the generated record to the table 432 generated in step S24. As a result, the variable to be collected is reflected in the table 432. Thereafter, the external device 400 transmits an upload result indicating normal end or abnormal end to the controller 200.
  • step S60 If the controller 200 has not received the execution instruction for the upload process of the variable to be collected (NO in step S60), the controller 200 switches the process to step S70 without executing the process of step S62.
  • step S70 the controller 200 determines whether or not to end the execution of the user program 210.
  • the termination command is issued based on, for example, receiving a termination operation from the user.
  • controller 200 determines that an end operation has been received from the user (YES in step S70)
  • controller 200 ends the execution of user program 210. Otherwise (NO in step S70), controller 200 returns control to step S40.
  • the external device 400 In the above description, an example in which the SQL statement of the INSERT command is transmitted from the controller 200 to the database 430 of the external device 400 in step S62 has been described. May be sent.
  • the external device 400 generates an SQL statement of the INSERT command based on the reception of the value to be inserted, and executes the INSERT processing of the received value based on the SQL statement.
  • Table generation FB> As described above, the development support apparatus 100 provides a function for generating the SQL statement 230 for table generation as the generation module 250.
  • the generation module 250 is provided, for example, as a function block (FB: Function Black).
  • FIG. 18 is a diagram illustrating a table generation FB 251 that is an example of the generation module 250.
  • the generation module 250 may be defined other than the function block.
  • the generation module 250 may include one defined by a ladder diagram, an instruction list, a structured text, and a sequential function chart, or a combination thereof.
  • the generation module 250 can also include a module defined by a general-purpose programming language such as JavaScript or C language.
  • the table generation FB 251 includes input units 255A to 255E that accept settings related to generation of the SQL statement 230, and output units 256A to 256F for outputting the generation result of the SQL statement 230.
  • the input unit 255A indicated as “Execute” accepts a setting for designating whether or not to execute the SQL statement generation process.
  • the input unit 255 ⁇ / b> A is defined to accept “BOOL” type input.
  • FALSE is input to the input unit 255A
  • the SQL statement generation process is not executed.
  • TRUE is input to the input unit 255A
  • an SQL sentence generation process is executed.
  • the input unit 255B indicated as “DBConnection” receives a connection result obtained by executing a function block for connecting to the database 430.
  • the connection result includes information for accessing the database 430 (for example, a database name).
  • the input unit 255C indicated as “TableName” accepts the setting of the table name.
  • the input unit 255E is defined to accept, for example, a “DWORD” type variable.
  • the input unit 255D indicated as “MappingVariableList” accepts input of variables to be collected.
  • the input unit 255D is defined to accept a predefined structure.
  • the above-described collection target variable 229 (see FIG. 17) is input to the input unit 255D.
  • the input unit 255E indicated as “PrimaryKey” receives an input for setting a primary key.
  • Input unit 255E is defined to accept, for example, a “String” type variable.
  • the table generation FB 251 is defined to accept an input for designating one of the variables to be collected as a primary key.
  • a signal indicating normal termination is output from the output unit 256A indicated as “Done”.
  • a signal indicating that the generation process is in progress is output from the output unit 256B indicated as “Busy”.
  • a signal indicating 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”.
  • the SQL statement 230 (see FIG. 17) generated by the execution of the table generation FB 251 is output from the output unit 256E indicated as “SQL Statement”.
  • a mapping table 232 (see FIG. 17) generated by executing the table generation FB 251 is output from the output unit 256F indicated as “MappingTable”.
  • FIG. 19 is a diagram schematically illustrating a generation process of the SQL sentence 230 according to the modification.
  • the generation module 250 generates the SQL statement 230 for table generation and the mapping table 232 by using the correspondence 213 and the collection target variable 229 as inputs.
  • the generation module 250A outputs the SQL statement 230 with the mapping table 232 generated by the mapping module 248 as an input. Since other points are as described above, the description thereof will not be repeated below.
  • the mapping module 248 is a program module that can be incorporated into the user program 210.
  • the mapping module 248 generates the mapping table 214 with the correspondence 213 and the collection target variable 229 as inputs.
  • the mapping module 248 determines an identification name on the database 430 for each variable to be collected. Assume that the mapping module 248 determines the identification names on the database 430 for the variables “A” to “F” as column names “A ′” to “F ′”. In one aspect, the mapping module 248 determines the same name as the variable name of each variable to be collected as an identification name on the database 430. In this case, the column names “A ′” to “F ′” are the same as the variable names “A” to “F”, respectively. In another aspect, the mapping module 248 determines a name including a variable name of each variable to be collected as the identification name on the database 430. In this case, the column names “A ′” to “F ′” are obtained by adding predetermined keywords to the variable names “A” to “F”, respectively.
  • mapping module 248 specifies, for each variable to be collected, the data type on the database 430 corresponding to the data type of the variable based on the correspondence 213.
  • the mapping module 248 includes variable names “A” to “F”, data types of variables “A” to “F”, identification names of the variables “A” to “F” on the database, The correspondence between the variable names “A” to “F” and the data types on the database is output as a mapping table 214 to the generation module 250A.
  • the generation module 250A generates the SQL statement 230 based on the identification name on the database defined in the mapping table 232 and the data type on the database corresponding to the identification name. Since the generation method of the SQL sentence 230 by the generation module 250A is as described above, the description thereof will not be repeated.
  • mapping FB The mapping module 248 shown in FIG. 19 is provided by, for example, a function block (FB).
  • FB function block
  • FIG. 20 is a diagram illustrating a mapping FB 249 that is an example of the mapping module 248.
  • mapping module 248 may be defined by a function block other than the function block.
  • the mapping module 248 may include those defined by ladder diagrams, instruction lists, structured text, and sequential function charts, or any combination thereof.
  • the mapping module 248 may include those defined in a general-purpose programming language such as JavaScript or C language.
  • the mapping FB 249 includes input units 258A and 258B that receive settings relating to the generation of the mapping table 214, and output units 259A to 259E for outputting the generation result of the mapping table 214.
  • the input unit 258 ⁇ / b> A indicated as “Execute” accepts a setting for designating whether to execute the mapping table 214 generation process.
  • the input unit 258 ⁇ / b> A is defined to accept “BOOL” type input.
  • FALSE is input to the input unit 258A
  • the generation process of the mapping table 214 is not executed.
  • TRUE is input to the input unit 258A
  • the generation process of the mapping table 214 is executed.
  • the input unit 258B indicated as “MappingVariableList” accepts input of variables to be collected.
  • the input unit 258B is defined to accept a predefined structure.
  • a collection target variable 229 (see FIG. 19) defined as a structure is input to the input unit 258B.
  • mapping table 214 When the mapping table 214 is normally generated, a signal indicating normal end is output from the output unit 259A indicated as “Done”. During the generation of the mapping table 214, a signal indicating that the generation process is in progress is output from the output unit 259B indicated as “Busy”. When the mapping table 214 is not normally generated, a signal indicating abnormal termination is output from the output unit 259C indicated as “Error”. In this case, an error ID for identifying the content of the error is further output from the output unit 259D indicated as “Error ID”. A mapping table 232 (see FIG. 19) generated by executing the mapping FB 249 is output from the output unit 259E indicated as “MappingTable”.
  • FIG. 19 is a diagram illustrating a table generation FB 251A that is an example of the generation module 250A.
  • the table generation FB 251A includes input units 255A to 255C, 255D2, and 255E that receive settings related to generation of the SQL statement 230, and output units 256A to 256F for outputting the generation result of the SQL statement 230. Since the configuration other than the input unit 255D2 is the same as that of the table generation FB 251 illustrated in FIG. 18, the description other than the input unit 255D2 will not be repeated below.
  • the input unit 255D2 indicated as “MappingValue” accepts the mapping table 232 generated by the mapping FB249 (see FIG. 20) as an input.
  • the table generation FB 251A generates the SQL statement 230 according to the information input to the input units 255A to 255C, 255D2, and 255E. Since the generation method of the SQL sentence 230 by the table generation FB 251A is as described with reference to FIG. 19, the description thereof will not be repeated.
  • a variable to be collected may include a structure.
  • the generation module 250 When a structure is included in the variable to be collected, the generation module 250 generates the SQL statement 230 for table generation in a different manner from the case where the structure is not included. For example, two generation patterns (generation patterns 3 and 4) are conceivable as generation processing of the table 432 in the case where a structure is included in the variable to be collected.
  • the generation module 250 separately generates a table for managing variables that are not structures and a table for managing member variables included in the structures.
  • the generation module 250 generates one table for commonly managing variables that are not structures and member variables included in the structures.
  • FIG. 22 schematically shows a generation pattern 3 of the table according to the second embodiment.
  • the generation module 250 receives the data type correspondence 213 and the collection target variable 229 as inputs and generates an SQL statement 230A for generating “TABLE1” and an SQL statement 230B for generating “TABLE2”. Yes.
  • the generation module 250 determines an identification name on the database 430 for each variable to be collected.
  • the variable to be collected includes a structure
  • the generation module 250 determines an identification name on the database 430 for the structure name, and the database 430 for each member of the structure. Determine the distinguished name above.
  • the identification names on the database 430 for the variables “A” and “B” to be collected are determined as the column names “A ′” and “B ′”.
  • the identification name on the database 430 for the structure “C” is determined in the column “C ′”.
  • the identification names on the database 430 for the member variables “ ⁇ ” to “ ⁇ ” of the structure “C” to be collected are determined as column names “ ⁇ ′” to “ ⁇ ′”.
  • the generation module 250 specifies, for each variable to be collected, a data type on the database 430 corresponding to the data type of the variable based on the correspondence 213.
  • the generation module 250 generates the SQL statement 230 based on the identification name determined for each variable to be collected and the data type on the database 430 specified for each variable to be collected. At this time, the generation module 250 stores the identification names “A ′” and “B ′” determined for the variable names to be collected and the identification name “C ′” determined for the structure name in the table “TABLE1”. An SQL sentence 230A is generated so as to be registered. Further, the generation module 250 sets the SQL statement 230B so as to register the identification names “ ⁇ ′” to “ ⁇ ′” determined for each member variable of the structure in a table “TABLE2” different from the table “TABLE1”. Generate.
  • the generation module 250 is based on the identifier “A ′” determined for the variable “A” and the data type “Number (10)” on the database corresponding to the variable “A”. Thus, the description “A ′ Number (10)” is reflected in the SQL sentence 230A. With this description, the column of the identification name “A ′” is added to the table. Similarly, the generation module 250 reflects the description for adding the columns of the identification names “B ′” and “C ′” in the SQL sentence 230A.
  • the generation module 250 includes in the SQL statement 230A an instruction code for registering the column name “C ′” determined for the structure name in the table “TABLE2” as an external key.
  • the description “FOREIGN KEY (C ′) REFERENCES TABLE2” is added to the SQL statement 230A.
  • the column “C ′” is defined as a foreign key referring to “TABLE2”.
  • the generation module 250 sets the columns “C ′”, “ ⁇ ′”, “ ⁇ ′”, “ ⁇ ” for the member variables “ ⁇ ”, “ ⁇ ”, “ ⁇ ” included in the structure “C”.
  • a description for adding “” is reflected in the SQL sentence 230B different from the SQL sentence 230A.
  • the description “C ′ Number (5)”, the description “ ⁇ ′ Number (5)”, the description “ ⁇ ′ Number (5)”, and “ ⁇ ′ Number ( 5) is reflected in the SQL sentence 230B.
  • columns of identification names “C ′”, “ ⁇ ′”, “ ⁇ ′”, and “ ⁇ ′” are added to another table.
  • the generation module 250 automatically generates SQL statements 230A and 230B for table generation.
  • FIG. 22 an example in which one structure is included in the variable to be collected has been described. However, in the case where a plurality of structures are included in the variable to be collected, the number of structures is described. An SQL statement is generated so that a table is generated according to the above. In addition, when a structure is included in the members of the structure, an SQL statement is generated so that a table is generated for each structure.
  • the generation module 250 further outputs mapping tables 232A and 232B as matching results in addition to the SQL statements 230A and 230B.
  • the mapping table 232A is generated as a generation result of the SQL sentence 230A.
  • the mapping table 232A shows the association result of the variable name corresponding to the column specified in the SQL statement 230A, the data type of the variable, the identification name of the column, and the data type of the column.
  • Each variable to be collected defined in the mapping table 232A is associated with a flag indicating whether or not the key is a primary key and a flag indicating whether or not NULL designation is prohibited.
  • the mapping table 232B is generated as a generation result of the SQL sentence 230B.
  • the mapping table 232B indicates a correspondence result of the variable name corresponding to the column specified in the SQL statement 230B, the data type of the variable, the identification name of the column, and the data type of the column.
  • Each variable to be collected defined in the mapping table 232B is associated with a flag indicating whether or not the key is a primary key and a flag indicating whether or not NULL designation is prohibited.
  • mapping tables 232A and 232B By outputting the mapping tables 232A and 232B, the user can easily specify the column name associated with each variable to be collected and the data type on the database corresponding to the data type of each variable to be collected. Can grasp.
  • FIG. 23 schematically shows a generation pattern 4 of the table according to the second embodiment.
  • the structure “C” is specified as a variable to be collected in the collection target variable 229.
  • the structure “C” includes variables “ ⁇ ”, “ ⁇ ”, and “ ⁇ ” as member variables.
  • the generation module 250 generates one table whose elements are variables that are not structures and member variables included in the structures.
  • the generation module 250 determines an identification name on the database 430 for each variable to be collected. At this time, if the variable to be collected includes a structure, the generation module 250 identifies each variable that is not a structure and each member variable included in the structure on the database 430. To decide. As a result, it is assumed that the identification names on the database 430 for the variables “A” and “B” to be collected are determined as the column names “A ′” and “B ′”. Further, it is assumed that the identification names on the database 430 for the member variables “ ⁇ ” to “ ⁇ ” of the structure “C” to be collected are determined as column names “ ⁇ ′” to “ ⁇ ′”.
  • the generation module 250 specifies the corresponding data type on the database 430 for each variable that is not a structure and each member variable included in the structure based on the correspondence relationship 213.
  • the generation module 250 generates the SQL statement 230 based on the identification name determined for each variable to be collected and the data type on the database 430 specified for each variable to be collected.
  • the SQL statement 230A is generated so that the identification names “A ′”, “B ′”, “ ⁇ ′” to “ ⁇ ′” determined for the variable names to be collected are registered in the table “TABLE1”.
  • the generation module 250 is based on the identifier “A ′” determined for the variable “A” and the data type “Number (10)” on the database corresponding to the variable “A”. Thus, the description “A ′ Number (10)” is reflected in the SQL sentence 230A. With this description, the column of the identification name “A ′” is added to the table. Similarly, the generation module 250 reflects the description for adding the columns of the identification names “B ′”, “ ⁇ ′” to “ ⁇ ′” in the SQL sentence 230A.
  • the generation module 250 automatically generates the SQL statement 230 for table generation.
  • the generation module 250 further outputs a mapping table 232 that is an association result in addition to the SQL statement 230.
  • the mapping table 232 is generated as a generation result of the SQL statement 230.
  • the mapping table 232 indicates a result of associating the variable name corresponding to the column specified in the SQL statement 230, the data type of the variable, the identification name of the column, and the data type of the column.
  • Each variable to be collected defined in the mapping table 232 is associated with a flag indicating whether or not the key is a primary key and a flag indicating whether or not NULL designation is prohibited.
  • mapping table 232 By outputting the mapping table 232, the user can easily grasp the column name associated with each variable to be collected and the data type on the database corresponding to the data type of each variable to be collected. can do.
  • FIG. 24 is a diagram showing a processing flow relating to table generation by the control system 10X according to the comparative example.
  • FIG. 25 is a diagram showing a processing flow relating to table generation by the control system 10 according to the second embodiment.
  • the control system 10X according to the comparative example is not equipped with a generation module 250 for automatically generating a table.
  • a generation module 250 for automatically generating a table.
  • the user In order to register a table in the control system 10X and upload data to be collected to the table, the user needs to perform the following steps S1 to S6.
  • Step S1 An SQL statement for generating a table is described on the external device 400, and the table is registered in advance on the database 430.
  • Step S2 Structure variables are defined on the development tool 30 of the development support apparatus 100 in accordance with the data structure of the table registered in the database 430 in Step S1.
  • Step S3 The structure variable defined in Step S2 is registered in the development support apparatus 100.
  • Step S4 The correspondence between each member of the structure variable defined in Step S2 and each column of the table registered in the database 430 in Step S1 is defined on the user program 210.
  • Step S5 The user program 210 is designed so that the variable to be collected is set in the structure variable registered in Step S3.
  • Step S6 The user program 210 is designed so that the structure variable in which the variable to be collected is set in Step S5 is uploaded to the database 430.
  • control system 10 if the user program 210 is designed to input a variable to be collected into the generation module 250, a table is automatically generated on the database 430. Therefore, in control system 10 according to the present embodiment, as shown in FIG. 25, the operations of steps S1, S2, S3, and S5 are not necessary. As a result, the operation with respect to the database 430 is facilitated, and the database 430 can be designed even by a user who has no specialized knowledge.
  • the development support apparatus 100 provides a function for automatically generating a table as the generation module 250.
  • the generation module 250 determines an identification name on the database 430 for each variable to be collected. Further, the generation module 250 collects data included in the user program 210 based on a predetermined correspondence 213 between a data type that can be used in the user program 210 and the data type that can be used in the database 430. For each target variable, the data type on the database 430 corresponding to the data type of the variable is specified. Next, the generation module 250 generates a table based on the identification name in the database 430 determined for each variable to be collected and the data type in the database 430 specified for each variable to be collected. An SQL statement is generated for
  • the user does not need to describe the SQL statement 230 when generating the table in the database 430. Therefore, even the user who does not have SQL knowledge can easily construct the database 430.
  • a controller (200) for controlling a control object A communication unit (201) for accessing the database (430); A storage device (208) for storing a control program for controlling the control object, The control program outputs a SQL statement (230) for generating a table (432) serving as a storage destination of a variable to be collected included in the control program on the database (430).
  • the generation module (250) Determining an identifier on the database (430) for each variable to be collected; Based on a predetermined correspondence (213) between a data type that can be used in the control program and a data type that can be used in the database (430), the data of the variable is collected for each variable to be collected. Identify the data type on the database (430) corresponding to the type, A controller that generates the SQL statement (230) based on the identification name determined for each variable to be collected and the data type specified for each variable to be collected.
  • the controller (200) includes each variable to be collected, a data type of each variable, an identification name on the database (430) for each variable, and the database ( 430) The controller according to configuration 1, further outputting a result of association with the data type above.
  • the generation module (250) uses the same name as the variable name of each variable to be collected or a name including the variable name of each variable to be collected on the database (430).
  • the controller according to Configuration 1 or 2, wherein: [Configuration 4] The generation module (250) If the variable to be collected includes a structure, determine the identifier for the structure name, determine the identifier for each member of the structure, Generating the SQL statement (230) to register the identification name determined for the structure name in the table (432); Any one of configurations 1 to 3, wherein the SQL statement (230) is generated so that the identification name determined for each member of the structure is registered in a table (432) different from the table (432) Controller described in the section. [Configuration 5] The controller according to configuration 4, wherein the SQL statement (230) includes a command statement for registering the identification name determined for the structure name in the table (432) as an external key.
  • the generation module (250) is defined to accept an input for designating one of the variables to be collected as a primary key, The controller according to any one of configurations 1 to 5, wherein the SQL statement (230) includes a command statement for registering in the table (432) using an identification name corresponding to a designated variable as a primary key. .

Abstract

SQL文を記述せずにデーターベース上にテーブルを生成するための技術が望まれている。制御システム(10)は、開発支援装置(100)とコントローラ(200)とを備える。開発支援装置(100)の開発ツール(30)は、制御プログラムに含まれる変数の内から収集対象の変数を指定する設定と、収集対象の各変数についてデーターベース(430)上での識別名を指定する設定とを設定情報(212)として受け付ける。コントローラ(200)は、設定情報(212)に規定されるデーターベース(430)上での識別名とデータ型とに基づいて、テーブル(432)をデーターベース(430)上に生成するためのSQL文を出力する生成モジュール(250)を含む。

Description

制御システム、コントローラ、および制御方法
 本開示は、コントローラによってアクセスされるデーターベース上にテーブルを生成するための技術に関する。
 様々な生産現場において、生産工程を自動化するFA(Factory Automation)システムが普及している。FAシステムは、種々の産業用の駆動機器によって構成される。産業用の駆動機器は、たとえば、ワークを移動するための移動テーブルや、ワークを搬送するためのコンベアや、予め定められた目的の場所までワーク移動するためのアームロボットなどを含む。これらの駆動機器は、PLC(Programmable Logic Controller)やロボットコントローラなどの産業用の制御装置(以下、「コントローラ」ともいう。)によって制御される。
 近年、外部機器のデーターベースにアクセスすることができるコントローラが普及している。このようなコントローラに関し、特開2016-194808号公報(特許文献1)は、「SQLの記述なしにデータベースを操作する技術において、簡易な仕組みで、複数のレコードをまとめて操作する」ことができるコントローラを開示している。国際公開第2014/184962号(特許文献2)は、「データベースからデータを読出す際に、従来に比してデータベースからの読出しの工程数を少なくすることができる」コントローラを開示している。
特開2016-194808号公報 国際公開第2014/184962号
 ところで、コントローラ内の収集対象のデータをデーターベースにアップロードするためには、データーベース上に予めテーブルを登録しておく必要がある。テーブルとは、データ管理のためのモデルである。テーブルは、列を示すカラムと、行を示すレコードとで構成される。
 ユーザは、データーベース上にテーブルを生成するためには、各カラムの属性を予め定義する必要がある。一例として、ユーザは、各カラムの識別名(カラム名)や各カラムに追加可能なデータ型などを定義する必要がある。その上で、コントローラ内における収集対象のデータをテーブルに追加するための事前準備として、ユーザは、コントローラ内の収集対象のデータをテーブル上の各カラム名と対応付けたり、各カラムで登録されているデータ型に合わせて収集対象のデータの型を変換する必要がある。
 このような事前設定には、SQLの知識など専門知識が必要となる。そのため、専門知識に乏しいユーザは、データーベースを構築することが非常に困難となる。したがって、SQL文を記述せずにデーターベース上にテーブルを生成することが可能な技術が望まれている。
 本開示の一例では、データーベースにアクセスすることが可能なコントローラと、上記コントローラと通信可能に構成されている開発支援装置とを備える。上記開発支援装置には、上記コントローラの制御プログラムの開発を支援するための開発ツールがインストールされ得る。上記開発ツールは、上記制御プログラムに含まれる変数の内から収集対象の変数を指定するための設定と、当該収集対象の各変数について上記データーベース上での識別名を指定するための設定とを設定情報として受け付けるように構成されている。上記コントローラまたは上記開発ツールは、上記開発支援装置から受信した上記設定情報に規定される上記データーベース上での識別名と、当該識別名に対応する上記データーベース上でのデータ型とに基づいて、上記収集対象の変数の格納先となるテーブルを上記データーベース上に生成するためのSQL文を出力するための生成モジュールを含む。
 この開示によれば、ユーザは、SQL文を記述せずにデーターベース上にテーブルを生成することができる。
 本開示の一例では、上記開発ツールは、上記収集対象の各変数が設定されたことに基づいて、当該変数のデータ型を表示する。
 この開示によれば、ユーザは、収集対象の変数のデータ型を容易に確認することができる。
 本開示の一例では、上記開発ツールは、上記収集対象として指定された変数の内から主キーを指定するための設定をさらに受け付けるように構成されている。
 この開示によれば、ユーザは、SQL文を記述せずに主キーの設定を行うことができる。
 本開示の一例では、上記開発ツールは、上記収集対象として指定された変数に構造体が含まれている場合、当該構造体に含まれる各メンバについて、上記データーベース上での識別名の指定を受け付けるように構成されている。
 この開示によれば、ユーザは、構造体に含まれているメンバ変数についても収集対象として設定することができる。
 本開示の一例では、上記生成モジュールは、上記構造体の各メンバについて決定された上記識別名を上記テーブルとは別のテーブルに登録するように上記SQL文を生成する。
 この開示によれば、ユーザは、構造体に含まれるメンバ変数を他の収集対象の変数とは別のテーブルとして管理することができる。
 本開示の一例では、上記生成モジュールは、上記構造体の識別名を外部キーとして上記テーブルに登録するための命令コードを上記SQL文に含める。
 この開示によれば、ユーザは、SQL文を記述せずに、構造体に対応するデーターベース上での識別名を外部キーとして登録することができる。
 本開示の他の例では、制御プログラムの開発を支援するための開発支援装置と通信可能に構成されており、データーベースにアクセスすることが可能なコントローラが提供される。上記開発支援装置には、上記制御プログラムの開発を支援するための開発ツールがインストールされ得る。上記開発ツールは、上記制御プログラムに含まれる変数の内から収集対象の変数を指定するための設定と、当該収集対象の各変数について上記データーベース上での識別名を指定するための設定とを設定情報として受け付けるように構成されている。上記コントローラは、上記設定情報および上記制御プログラムを上記開発支援装置から受信するための通信部と、上記開発支援装置から受信した上記制御プログラムに従って制御対象の駆動機器を制御するためのプログラム実行モジュールと、上記開発支援装置から受信した上記設定情報に規定される上記データーベース上での識別名と、当該識別名に対応する上記データーベース上でのデータ型とに基づいて、上記収集対象の変数の格納先となるテーブルを上記データーベース上に生成するためのSQL文を出力するための生成モジュールとを備える。
 この開示によれば、ユーザは、SQL文を記述せずにデーターベース上にテーブルを生成することができる。
 本開示の他の例では、制御プログラムの開発を支援するための開発支援装置と通信可能に構成されており、データーベースにアクセスすることが可能なコントローラの制御方法が提供される。上記開発支援装置には、上記制御プログラムの開発を支援するための開発ツールがインストールされ得る。上記開発ツールは、上記制御プログラムに含まれる変数の内から収集対象の変数を指定するための設定と、当該収集対象の各変数について上記データーベース上での識別名を指定するための設定とを設定情報として受け付けるように構成されている。上記制御方法は、上記設定情報および上記制御プログラムを上記開発支援装置から受信するステップと、上記開発支援装置から受信した上記制御プログラムに従って制御対象の駆動機器を制御するステップと、上記開発支援装置から受信した上記設定情報に規定される上記データーベース上での識別名と、当該識別名に対応する上記データーベース上でのデータ型とに基づいて、上記収集対象の変数の格納先となるテーブルを上記データーベース上に生成するためのSQL文を出力するステップとを備える。
 この開示によれば、ユーザは、SQL文を記述せずにデーターベース上にテーブルを生成することができる。
 ある局面において、SQL文を記述せずにデーターベース上にテーブルを生成することができる。
第1の実施の形態に従う制御システムの構成例を示す図である。 第1の実施の形態における、開発支援装置とコントローラと駆動機器と外部機器との間のデータの流れを示すシーケンス図である。 第1の実施の形態に従う開発ツールが提供するユーザインターフェイスの一例であるプログラム設計画面を示す図である。 第1の実施の形態に従う開発ツールが提供するユーザインターフェイスの一例であるテーブル設定画面を示す図である。 第1の実施の形態におけるSQL文の生成処理を概略的に示す図である。 図5に示されるSQL文に従って生成されたテーブルのデータ構造を示す図である。 第1の実施の形態に従うテーブルの生成パターン1を概略的に示す図である。 図7に示されるSQL文に従って生成されたテーブルのデータ構造を示す図である。 第1の実施の形態に従うテーブルの生成パターン2を概略的に示す図である。 図9に示されるSQL文から生成されたテーブルのデータ構造を示す図である。 第1の実施の形態に従う開発支援装置のハードウェア構成を示す模式図である。 第1の実施の形態に従うコントローラのハードウェア構成の一例を示す模式図である。 第1の実施の形態に従う外部機器のハードウェア構成を示すブロック図である。 第2の実施の形態に従う制御システムの構成例を示す図である。 第2の実施の形態に従う生成モジュールによるSQL文の生成処理を概略的に示す図である。 第2の実施の形態における、開発支援装置とコントローラと駆動機器と外部機器との間のデータの流れを示すシーケンス図である。 第2の実施の形態におけるSQL文の生成処理を概略的に示す図である。 第2の実施の形態に従う生成モジュールの一例であるテーブル生成FBを示す図である。 変形例におけるSQL文の生成処理を概略的に示す図である。 第2の実施の形態に従うマッピングモジュールの一例であるマッピングFBを示す図である。 第2の実施の形態に従う生成モジュールの一例であるテーブル生成FBを示す図である。 第2の実施の形態における生成パターン3を概略的に示す図である。 第2の実施の形態における生成パターン4を概略的に示す図である。 比較例に従う制御システムによるテーブル生成に係る処理フローを示す図である。 第2の実施の形態に従う制御システムによるテーブル生成に係る処理フローを示す図である。
 以下、図面を参照しつつ、本発明に従う各実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。したがって、これらについての詳細な説明は繰り返さない。
 ≪第1の実施の形態≫
 <A.適用例>
 図1を参照して、本発明の適用例について説明する。図1は、第1の実施の形態に従う制御システム10の構成例を示す図である。
 制御システム10は、生産工程を自動化するためのFAシステムである。図1の例では、制御システム10は、1つ以上の開発支援装置100と、1つ以上のコントローラ200と、1つ以上の駆動機器300と、1つ以上の外部機器400とで構成されている。
 開発支援装置100、コントローラ200、および外部機器400は、ネットワークNW1に接続されている。ネットワークNW1には、EtherNET(登録商標)やOPC-UA(Object Linking and Embedding for Process Control Unified Architecture)などが採用される。OPC-UAは、ベンダーやOS(Operating System)の種類などに依存することなくデータ交換を実現するために定められた通信の標準規格である。
 開発支援装置100は、たとえば、ノート型またはデスクトップ型のPC(Personal Computer)、タブレット端末、スマートフォン、または、コントローラ200用の制御プログラムを開発することが可能なその他の情報処理装置である。外部機器400は、データーベース機能を有するその他のDBMS(Database Management System)である。外部機器400は、たとえば、ノート型またはデスクトップ型のPCまたはサーバである。
 コントローラ200および駆動機器300は、ネットワークNW2に接続されている。ネットワークNW2には、データの到達時間が保証される、定周期通信を行うフィールドネットワークを採用することが好ましい。このような定周期通信を行うフィールドネットワークとしては、EtherCAT(登録商標)、EtherNet/IP(登録商標)、登録商標)、CompoNet(登録商標)などが知られている。
 駆動機器300は、生産工程を自動化するための種々の産業用機器を含む。一例として、駆動機器300は、ロボットコントローラ300Aや、サーボドライバ300Bや、ロボットコントローラ300Aに制御されるアームロボット301Aや、サーボドライバ300Bによって制御されるサーボモータ301Bなどを含む。また、駆動機器300は、ワークを撮影するための視覚センサや、生産工程で利用されるその他の機器などを含んでもよい。
 開発支援装置100には、開発ツール30がインストールされ得る。開発ツール30は、コントローラ200用の制御プログラムの開発を支援するためのアプリケーションである。一例として、開発ツール30は、オムロン社製の「Sysmac Studio」である。ユーザは、開発ツール30上でコントローラ200用の制御プログラムを設計し、設計した制御プログラムをユーザプログラム210としてコントローラ200にインストールすることができる。ユーザプログラム210は、開発支援装置100によってコンパイルされた実行形式のファイルとしてコントローラ200に送られる。
 開発ツール30は、ユーザプログラム210に含まれる変数の内から収集対象の変数を選択するための選択操作を受け付ける。「変数」とは、ユーザプログラム210のソースコードにおいて扱われるデータに与えられた識別子である。典型的には、「変数」は、コントローラ200や駆動機器300の状態を表わすデータである。異なる言い方をすれば、「変数」とは、コントローラ200や駆動機器300の各構成の状態に連動して値が変化するデータのことをいう。「変数」との概念は、一つの値を表わすデータ、配列として表されるデータ、構造体として表されるデータ、ユーザプログラム210に規定され得る種々のデータを含み得る。
 収集対象として選択された変数は、ユーザプログラム210の実行中に収集され、外部機器400のデーターベース430に定期的にアップロードされる。データーベース430にデータをアップロードするためには、データーベース430上に予めテーブル432を登録しておく必要がある。テーブル432とは、データ管理のためのモデルである。テーブル432は、列を示すカラムと行を示すレコードとで表される。各カラムにデータがセットされた上で、データは、レコード単位でテーブル432にアップロードされる。
 本実施の形態においては、設計者は、テーブル432を生成するための操作を開発ツール30に対して行うことができる。より具体的には、開発ツール30は、ユーザプログラム210に含まれる変数の内から収集対象の変数を指定するための設定を受け付けるように構成されている。また、開発ツール30は、収集対象の各変数のデータ型に対応するデーターベース430上でのデータ型を指定するための設定を受け付けるように構成されている。また、開発ツール30は、収集対象の各変数についてデーターベース430上での識別名を指定するための設定を受け付けるように構成されている。これらの設定は、たとえば、後述のテーブル設定画面33(図4参照)に対して行われる。テーブル設定画面33の詳細については後述する。
 図1の例では、ユーザプログラム210に含まれる変数「A」,「B」が収集対象として指定されている。変数「A」は、「Int」型の変数である。変数「B」は、「bool」型の変数である。また、変数「A」に対応するデーターベース430での識別名としてカラム名「A’」が指定されている。変数「B」に対応するデーターベース430での識別名としてカラム名「B’」が指定されている。また、変数「A」のデータ型「Int」に対応するデーターベース430上でのデータ型として「Number(10)」が指定されている。また、変数「B」のデータ型「bool」に対応するデーターベース430上でのデータ型として「Number(1)」が指定されている。
 これらの対応関係は、設定情報212としてコントローラ200に送られる。コントローラ200は、制御装置202と、記憶装置208とを含む。制御装置202は、機能構成として、生成モジュール250と、プログラム実行モジュール252とを含む。記憶装置208は、開発支援装置100から受信したユーザプログラム210と設定情報212とを格納している。
 プログラム実行モジュール252は、ユーザプログラム210の実行開始命令を受け付けたことに基づいて、ユーザプログラム210の実行を開始する。その後、プログラム実行モジュール252は、ユーザプログラム210に規定される制御命令に従って駆動機器300を制御する。プログラム実行モジュール252は、ユーザプログラム210の実行結果に従って変数の値を逐次更新する。
 生成モジュール250は、設定情報212に規定されるデーターベース430上での識別名と、当該識別名に対応するデーターベース430上でのデータ型とに基づいて、収集対象の変数の格納先となるテーブル432をデーターベース430上に生成するためのSQL文230を出力する。図1の例では、SQL文230は、「Number(10)」型のカラム「A’」と「Number(1)」型のカラム「B’」とを含むテーブル432を構成するように規定されている。
 生成されたSQL文230は、外部機器400に転送される。DBMSとしての外部機器400は、コントローラ200から受信したSQL文230を解釈し、SQL文230に従ってデーターベース430上にテーブル432を生成する。図1の例では、カラム「A’」,「B’」を含むテーブル432がデーターベース430上に生成される。
 以上のようにして、開発支援装置100は、収集対象の変数を指定するための設定と、収集対象の各変数のデータ型に対応するデーターベース430上でのデータ型を指定するための設定と、収集対象の各変数についてデーターベース430上での識別名を指定するための設定とを受け付けるように構成されている。コントローラ200は、これらの設定に基づいて、データーベース430上にテーブル432を生成するためのSQL文230を外部機器400に出力する。これにより、外部機器400のデーターベース430上にテーブル432が生成される。このように、ユーザは、テーブル432を生成するにあたってSQL文230を記述する必要がない。そのため、SQLの知識がないユーザであってもデーターベース430を容易に構築することできる。
 なお、上述では、ユーザプログラム210に含まれる変数を元にテーブル432を生成する例について説明を行ったが、生成モジュール250は、ユーザプログラム210に含まれる変数以外にも、コントローラ200内の各種制御プログラムに含まれる変数を元にテーブル432を生成してもよい。
 また、図1には、ユーザプログラム210および設定情報212が別個のデータとしてコントローラ200に転送されている例が示されているが、ユーザプログラム210および設定情報212は、一体的なデータとして転送されてもよい。また、設定情報212は、ユーザプログラム210と同一のタイミングで転送されてもよいし異なるタイミングで転送されてもよい。
 また、図1の例では、データーベース430が外部機器400に存在する例について説明を行ったが、データーベース430は、必ずしも、外部機器400に存在する必要はない。たとえば、データーベース430は、コントローラ200の内部に存在していてもよい。あるいは、データーベース430は、コントローラ200の内部バスに繋がれた別ユニットの内部に存在していてもよい。
 <B.シーケンスフロー>
 図2~図6を参照して、テーブル432の生成処理に係る処理フローについて説明する。図2は、開発支援装置100とコントローラ200と駆動機器300と外部機器400との間のデータの流れを示すシーケンス図である。
 ステップS10において、開発支援装置100は、開発ツール30の起動命令を受け付けたとする。このことに基づいて、開発支援装置100は、プログラム設計画面を表示する。図3は、開発ツール30が提供するユーザインターフェイスの一例であるプログラム設計画面31を示す図である。プログラム設計画面31は、たとえば、開発支援装置100の表示部121に表示される。
 ユーザプログラム210は、任意のプログラミング言語で記述され得る。一例として、ユーザプログラム210は、ラダーダイアグラム(LD:Ladder Diagram)で規定されてもよいし、命令リスト(IL:Instruction List)、構造化テキスト(ST:Structured Text)、および、シーケンシャルファンクションチャート(SFC:Sequential Function Chart)のいずれか、あるいは、これらの組み合わせで規定される。あるいは、ユーザプログラム210は、JavaScript(登録商標)やC言語のような汎用的なプログラミング言語で規定されていてもよい。
 図3の例では、ユーザプログラム210は、ラダーダイアグラムで記述されている。設計者は、プログラム設計画面31上で、任意のファンクションブロックを組み合わせたり、変数やファンクションブロックの入出力関係を規定することで、制御対象の駆動機器300に合わせたユーザプログラム210を設計することができる。ファンクションブロックとは、ユーザプログラム210内で繰り返し使用される機能が部品化されたものである。
 図3の例では、ユーザプログラム210は、変数A~Cと、ファンクションブロックFB1,FB2とを含む。ファンクションブロックFA1は、その入力部に関連付けられている変数Aの値に基づいて、ファンクションブロックFB1に規定されている予め定められた機能を実行する。当該実行結果は、ファンクションブロックFA1の出力部に関連付けられている変数Bに反映される。ファンクションブロックFB2は、その入力部に関連付けられている変数Bの値に基づいて、ファンクションブロックFB2に規定されている予め定められた機能を実行する。当該実行結果は、ファンクションブロックFA2の出力部に関連付けられている変数Cに反映される。このように、設計者は、プログラム設計画面31上で、変数やファンクションブロックを組み合わせることで、任意のユーザプログラム210を設計することができる。
 再び図2を参照して、ステップS14において、開発ツール30は、テーブル生成に関するテーブル設定画面の呼び出し操作を受け付けたとする。このことに基づいて、開発ツール30は、テーブル設定画面を表示する。
 図4は、開発ツール30が提供するユーザインターフェイスの一例であるテーブル設定画面33を示す図である。テーブル設定画面33は、テーブル生成のための各種設定を受け付ける。
 より具体的には、テーブル設定画面33は、データーベースへの接続情報の設定欄35と、テーブル名の設定欄36と、収集対象の変数を指定するための設定欄41と、収取対象の変数のデータ型を表示するための表示欄42と、データーベース上でのデータの識別名を指定するための設定欄45と、データーベース上でのデータ型を指定するための設定欄46と、主キーを指定するための設定欄50と、null指定の許可/禁止を指定するための設定欄51を含む。
 設定欄35は、データーベースへの接続情報の指定を受け付ける。各コネクション情報は、ユーザなどによって予め設定されている。コネクション情報には、コネクション名、接続対象のデーターベースタイプ、接続先アドレスデータベース名、ユーザ名、パスワードなどが規定されている。ユーザがボタン35Aを押下することで、各コネクション情報に規定されているデーターベースタイプが一覧表示される。データーベースタイプの種類としては、たとえば、「Oracle Database」、「SQL Server」、「MySQL(登録商標)」、「Firebird」、「DB2(登録商標)」、「PostgreSQL」などが挙げられる。ユーザは、データーベースタイプの一覧から一のデーターベースタイプを選択することでデーターベースへの接続情報を指定することができる。
 設定欄36は、生成対象のテーブル432についてのテーブル名の入力を受け付ける。設定欄36は、たとえば、テキストボックスであり、テーブル名は、文字入力により設定される。図4の例では、テーブル名として「TABLE1」が設定されている。
 設定欄41は、収集対象の変数の指定を受け付ける。典型的には、ユーザがボタン41Aを押下することで、ユーザプログラム210で定義さている構造体名(変数名)が一覧表示される。一覧表示される構造体名は、ユーザによって予め登録されていてもよいし、ユーザプログラム210から自動で抽出されてもよい。ユーザは、構造体名の一覧から一の構造体名を選択することで構造体に含まれる変数を収集対象として指定することができる。
 表示欄42は、設定欄41で設定された収集対象の各変数のデータ型を表示する。各変数に対応するデータ型は、たとえば、上述のプログラム設計画面31(図3参照)において変数を登録するときなどに設定され、この設定時におて、変数とデータ型との対応関係が保存される。開発ツール30は、収集対象の変数が設定欄41で選択されたことに基づいて、変数とデータ型との対応関係から当該選択された変数に対応するデータ型を特定し、当該データ型を当該変数に並べて表示する。
 設定欄45は、設定欄41で設定された収集対象の各変数について、データーベース430上での識別名を指定するための設定を受け付ける。設定欄45に設定された識別名は、テーブルのカラム名となる。設定欄45は、たとえば、テキストボックスであり、ユーザは、各テキストボックスに文字入力を行うことで各変数に対応するカラム名を設定することができる。
 好ましくは、テーブルのカラム名は、自動で決定される。一例として、カラム名は、変数名と同じになるように決定される。あるいは、変数名に予め定められたキーワードを付加したものがカラム名として決定される。カラム名が自動で設定される場合には、ユーザは、設定欄45にカラム名を設定する必要はない。
 設定欄46は、設定欄41で設定された各変数についてデーターベース430上でのデータ型を指定するための設定を受け付ける。一例として、ユーザがボタン46Aを押下することで、設定可能なデータ型が一覧表示される。ユーザは、データ型の一覧から一のデータ型を選択することでデーターベース430上でのデータ型を指定することができる。
 好ましくは、データーベース430上でのデータ型は、自動で決定される。より具体的には、ユーザプログラム210で利用され得る各データ型と、データーベース430上でのデータ型との対応関係が予め規定されている。開発ツール30は、当該対応関係に基づいて、収集対象の各変数のデータ型に対応するデーターベース430上でのデータ型を特定し、当該データ型を設定欄46に表示する。この場合には、ユーザは、設定欄46にデータ型を設定する必要はない。
 設定欄50は、テーブル432上で主キーとしてみなす変数を指定するための設定を受け付ける。主キーとは、テーブル432内のレコードを一意に識別するためのものである。主キーとして設定された変数については、データの重複が許されない。主キーの設定態様の一例として、ユーザがボタン50Aを押下することで、「YES」および「NO」が表示される。「YES」が選択されたカラムは、主キーとして設定される。「NO」が選択されたカラムは、主キーとして設定されない。
 設定欄51は、各カラムに対してNULLの入力を許容するか否かの設定を受け付ける。設定態様の一例として、ユーザがボタン51Aを押下することで、「YES」および「NO」が表示される。「YES」が選択されたカラムについては、NULLの入力が禁止される。「NO」が選択されたカラムについては、NULLの入力が許容される。
 テーブル生成ボタン58が押下された場合には、開発支援装置100は、テーブル設定画面33に対して行われたテーブル設定を設定情報212としてコントローラ200に転送する。テーブル設定画面33のキャンセルボタン59が押下された場合には、開発支援装置100は、テーブル設定画面33に設定されたテーブル設定を転送せずにテーブル設定画面33を閉じる。
 再び図2を参照して、ステップS20において、テーブル生成ボタン58が押下されたとする。このことに基づいて、開発支援装置100は、テーブル設定画面33に対して行われたテーブル設定を設定情報212としてコントローラ200に転送する。
 ステップS22において、コントローラ200の生成モジュール250は、開発支援装置100から設定情報212を受信したことに基づいて、テーブル生成のためのSQL文230(図1参照)を生成する。なお、ステップS22では、SQL文230がコントローラ200によって生成される例について示されているが、SQL文230は、開発ツール30によって生成されてもよい。
 図5を参照して、生成モジュール250によるSQL文230の生成処理について説明する。図5は、SQL文230の生成処理を概略的に示す図である。
 図5に示されるように、生成モジュール250は、設定情報212を入力として、SQL文230を生成する。より具体的には、生成モジュール250は、設定情報212に含まれるテーブル名「TABLE1」を参照して、「Create Table TABLE1」との記述をSQL文230に反映する。この記述により、生成されるテーブル432のテーブル名が「TABLE1」となる。
 次に、生成モジュール250は、設定情報212に含まれる識別名「A’」と、識別名「A’」に対応付けられているデータ型「Number(10)」とに基づいて、「A’ Number(10)」との記述をSQL文230に反映する。この記述により、識別名「A’」のカラムがテーブル432に追加される。また、識別名「A’」については、NULL指定が禁止されているので、「NOT NULL」との記述をSQL文230に反映する。同様に、生成モジュール250は、識別名「B’」~「F’」のカラムを追加するための記述をSQL文230に反映する。
 次に、設定情報212において識別名「A’」、「B’」のカラムを主キーとして設定することが規定されているので、生成モジュール250は、「PRIMARY KEY (A’、B’)」との記述をSQL文230に追加する。この記述により、識別名「A’」、「B’」のカラムが主キーとして設定される。
 生成されたSQL文230は、外部機器400に送信される。再び図2を参照して、ステップS24において、外部機器400は、コントローラ200から受信したSQL文230に従ってテーブル432を生成する。
 図6は、図5に示されるSQL文230に従って生成されたテーブル432のデータ構造を示す図である。図6に示されるように、テーブル432は、識別名「A’」~「F’」のカラムで構成されている。「*」印は、主キーを表わす。図6の例では、カラム「A’」,「B’」が主キーとして示されている。
 再び図2を参照して、ステップS30において、開発ツール30は、コンパイル操作を受け付けたとする。このことに基づいて、開発ツール30は、プログラム設計画面31上で設計されたユーザプログラム210をコンパイルする。その後、開発ツール30は、コンパイル結果のダウンロード操作を受け付けたとする。このことに基づいて、開発ツール30は、コンパイルされたユーザプログラム210をコントローラ200に転送する。コントローラ200は、受信したユーザプログラム210を記憶装置208(図1参照)に保存する。
 ステップS32において、コントローラ200は、ユーザプログラム210の実行命令を受け付けたとする。このことに基づいて、コントローラ200は、ユーザプログラム210の実行を開始する。ユーザプログラム210がサイクリック実行型のプログラムである場合、コントローラ200は、予め定められた制御周期ごとにユーザプログラム210に含まれる命令群を繰り返し実行する。より具体的には、コントローラ200は、ユーザプログラム210の先頭行から最終行までを1制御周期で実行する。その次の制御周期では、コントローラ200は、再び、ユーザプログラム210の先頭行から最終行までを実行する。コントローラ200は、制御周期ごとに指令値を生成し、当該指令値を駆動機器300に出力する。
 ステップS50において、コントローラ200は、ユーザプログラム210に規定される指令値の生成処理の実行命令を受け付けたか否かを判断する。コントローラ200は、当該実行命令を受け付けたと判断した場合(ステップS50においてYES)、規定されている命令に従って指令値を生成し、当該指令値を駆動機器300に送る(ステップS52)。駆動機器300は、コントローラ200から受信した指令値に従って制御対象を駆動する。コントローラ200は、指令値の生成処理の実行命令を受け付けたと判断しなかった場合(ステップS50においてNO)、コントローラ200は、ステップS52の処理を実行せずに、制御をステップS60に切り替える。
 ステップS60において、コントローラ200は、収集対象の変数のアップロード処理の実行命令を受け付けたか否かを判断する。コントローラ200は、当該実行命令を受け付けたと判断した場合(ステップS60においてYES)、INSERT命令を実行するためのSQL文を生成する。当該SQL文には、追加先のテーブルを指定するための情報(たとえば、テーブル名)や、各カラムにアップロードするデータの値などが規定される。
 ステップS62において、コントローラ200は、生成したSQL文を外部機器400に送る。外部機器400は、コントローラ200から受信したSQL文に従って各カラムに変数値を反映したレコードを生成し、ステップS24で生成されたテーブル432に生成したレコードを追加する。これにより、収集対象の変数がテーブル432に反映される。その後、外部機器400は、正常終了または異常終了を示すアップロード結果をコントローラ200に送信する。
 コントローラ200は、収集対象の変数のアップロード処理の実行命令を受けていない場合(ステップS60においてNO)、ステップS62の処理を実行せずに、処理をステップS70に切り替える。
 ステップS70において、コントローラ200は、ユーザプログラム210の実行を終了するか否かを判断する。当該終了命令は、たとえば、ユーザから終了操作を受け付けたことに基づいて発せられる。コントローラ200は、ユーザから終了操作を受け付けたと判断した場合(ステップS70においてYES)、ユーザプログラム210の実行を終了する。そうでない場合には(ステップS70においてNO)、コントローラ200は、制御をステップS50に戻す。
 なお、上述では、ステップS62において、INSERT命令のSQL文がコントローラ200から外部機器400のデーターベース430に送信される例について説明を行ったが、INSERTする値のみが外部機器400のデーターベース430に送られてもよい。この場合、外部機器400は、INSERTする値を受信したことに基づいて、INSERT命令のSQL文を生成し、当該SQL文に基づいて受信した値のINSERT処理を実行する。
 <C.生成モジュール250による生成パターン>
 収集対象の変数には、構造体が含まれる場合がある。生成モジュール250は、収集対象の変数に構造体が含まれる場合には、そうではない場合と異なる態様でテーブル生成のためのSQL文230を生成する。収集対象の変数に構造体が含まれる場合におけるテーブル432の生成処理として、たとえば、2つの生成パターン(生成パターン1,2)が考えられる。
 生成パターン1においては、生成モジュール250は、構造体ではない変数を管理するためのテーブルと、構造体に含まれるメンバ変数を管理するためのテーブルとを別々に生成する。生成パターン2においては、生成モジュール250は、構造体ではない変数と構造体に含まれるメンバ変数とを共通に管理するための1つのテーブルを生成する。
 以下では、図7~図10を参照して、第1の実施の形態における生成パターン1,2について順に説明する。
  (C1.テーブルの生成パターン1)
 まず、第1の実施の形態に従うテーブルの生成パターン1について説明する。図7は、第1の実施の形態に従うテーブルの生成パターン1を概略的に示す図である。
 上述の開発ツール30(図4参照)は、収集対象として指定された変数に構造体が含まれている場合には、構造体ではない変数だけでなく構造体に含まれる各メンバについても、データーベース430上でのデータ型の指定と、データーベース430上での識別名の指定とを受け付ける。
 たとえば、上述のテーブル設定画面33(図4参照)において、構造体「C」が収集対象として指定されたとする。構造体「C」がメンバ変数「α」,「β」,「γ」を含む場合、ユーザは、メンバ変数「α」,「β」,「γ」についても、データーベース430上でのデータ型の指定と、データーベース430上での識別名(カラム名)の指定とを受け付ける。一例として、メンバ変数「α」に対してはデータ型「Number(5)」のカラム「α’」が設定され、メンバ変数「β」に対してはデータ型「Number(5)」のカラム「β’」が設定され、メンバ変数「γ」に対してはデータ型「Number(5)」のカラム「γ’」が設定されたとする。これらの設定の結果、図7に示される設定情報212が生成される。
 本生成例においては、図7に示されるように、コントローラ200の生成モジュール250は、設定情報212を入力として、構造体の各メンバについて決定された識別名を別のテーブルに登録するようにSQL文を生成する。図7の例では、生成モジュール250は、設定情報212を入力として、「TABLE1」を生成するためのSQL文230Aと、「TABLE2」を生成するためのSQL文230Bとを生成している。
 より具体的には、生成モジュール250は、設定情報212に含まれる識別名「A’」と、識別名「A’」に対応付けられているデータ型「Number(10)」とに基づいて、「A’ Number(10)」との記述をSQL文230Aに反映する。この記述により、識別名「A’」のカラムがテーブルに追加される。また、識別名「A’」については、NULL指定が禁止されているので、「NOT NULL」との記述をSQL文230Aに反映する。同様に、生成モジュール250は、識別名「B’」のカラムを追加するための記述をSQL文230Aに反映する。
 構造体「C」については、生成モジュール250は、構造体名に対応するカラム名「C’」を新たに生成する。カラム名「C’」は、構造体名と同じであってもよいし、異なっていてもよい。その後、生成モジュール250は、「C’ Number(5)」との記述をSQL文230Aに反映する。これにより、識別名「C’」のカラムがテーブルに追加される。
 また、生成モジュール250は、構造体のカラム名を外部キーとしてテーブルに登録するための命令コードをSQL文230Aに含める。図7の例では、「FOREIGN KEY(C’) REFERENCES TABLE2」との記述がSQL文230Aに追加されている。この記述により、カラム「C’」が「TABLE2」を参照する外部キーとして規定される。
 続いて、生成モジュール250は、構造体「C」に含まれるメンバ変数「α」,「β」,「γ」については、カラム「C’」,「α’」,「β’」,「γ’」を追加するための記述をSQL文230Aとは別のSQL文230Bに反映する。図7の例では、「C’ Number(5)」との記述と、「α’ Number(5)」との記述と、「β’ Number(5)」との記述と、「γ’ Number(5)」との記述とがSQL文230Bに反映されている。これらの記述により、識別名「C’」,「α’」,「β’」,「γ’」のカラムが別テーブルに追加される。このとき、構造体名「C」に付けられたカラム名「C’」については、「PRIMARY KEY (C’)」との記述をSQL文230Bに追加する。この記述により、識別名「C’」のカラムが主キーとして設定される。
 図8は、図7に示されるSQL文230Aに従って生成されたテーブル432Aと、図7に示されるSQL文230Bに従って生成されたテーブル432Bとのデータ構造を示す図である。
 テーブル432Aは、識別名「A’」,「B’」,「C’」のカラムで構成されている。「*」印は、主キーを表わす。図8の例では、カラム「A’」,「B’」が主キーとして示されている。また、カラム「C’」は、外部の「TABLE2」を参照している。
 テーブル432Bは、識別名「C’」,「α’」,「β’」,「γ’」のカラムで構成されている。「*」印は、主キーを表わす。図8の例では、カラム「C’」が主キーとして示されている。
 このように、本生成例においては、生成モジュール250は、構造体ではない変数を管理するためのテーブル432Aと、構造体に含まれるメンバ変数を管理するためのテーブル432Bとを別々に生成する。
 なお、図7および図8では、収集対象の変数に1つの構造体が含まれている例について説明を行ったが、収集対象の変数に複数の構造体が含まれている場合には、構造体の数に応じてテーブルが生成されるようにSQL文が生成される。また、構造体のメンバに構造体が含まれている場合には、各構造体についてテーブルが生成されるようにSQL文が生成される。
 また、上述の図7および図8の例では、収集対象の変数に構造体が含まれている場合に、当該構造体の名前がテーブル432Aの外部キーおよびテーブル432Bの主キーとして登録される例について説明を行ったが、当該構造体の名前がテーブル432Aの外部キーおよびテーブル432Bの主キーとして必ずしも登録される必要はない。一例として、当該構造体の1つ以上のメンバがテーブル432Aの外部キーおよびテーブル432Bの主キーとして登録されてもよい。一例として、構造体「C」のメンバ「C.α」が、テーブル432Aの外部キーとして登録されるとともに、テーブル432Bの主キーとして登録される。この場合には、構造体「C」自体がテーブル432A,432Bのカラムとして登録される必要はない。
  (C2.テーブルの生成パターン2)
 次に、図9および図10を参照して、収集対象の変数に構造体が含まれている場合におけるテーブル432の生成パターン2について説明する。
 図9は、第1の実施の形態に従うテーブルの生成パターン2を概略的に示す図である。図9に示されるように、コントローラ200の生成モジュール250は、設定情報212を入力としてSQL文230を生成する。
 設定情報212には、構造体「C」が収集対象の変数として規定されているとする。構造体「C」は、メンバ変数として、変数「α」,「β」,「γ」を含む。本生成例においては、生成モジュール250は、構造体ではない変数と、構造体に含まれるメンバ変数とを共通に管理するための1つのテーブル432を生成する。
 より具体的には、生成モジュール250は、設定情報212に含まれる識別名「A’」と、識別名「A’」に対応付けられているデータ型「Number(10)」とに基づいて、「A’ Number(10)」との記述をSQL文230に反映する。この記述により、識別名「A’」のカラムがテーブル432に追加される。また、識別名「A’」については、NULL指定が禁止されているので、「NOT NULL」との記述をSQL文230に反映する。同様に、生成モジュール250は、識別名「B’」のカラムを追加するための記述をSQL文230に反映する。また、構造体「C」のメンバ変数「α」,「β」,「γ」については、生成モジュール250は、変数「A」,「B」と同様に、識別名「α’」,「β’」,「γ’」のカラムを追加するための記述をSQL文230に反映する。
 図10は、図9に示されるSQL文230から生成されたテーブル432のデータ構造を示す図である。
 テーブル432は、識別名「A’」,「B’」,「C’」,「α’」,「β’」,「γ’」のカラムで構成されている。「*」印は、主キーを表わす。図10の例では、カラム「A’」,「B’」が主キーとして示されている。
 このように、本生成例においては、生成モジュール250は、構造体ではない変数と、構造体に含まれるメンバ変数とを共通に管理するための1つのテーブル432を生成する。
 <D.ハードウェア構成>
 図11~図13を参照して、開発支援装置100、コントローラ200、および外部機器400のハードウェア構成について順に説明する。
  (D1.開発支援装置100のハードウェア構成)
 まず、図11を参照して、開発支援装置100のハードウェア構成について説明する。図11は、開発支援装置100のハードウェア構成を示す模式図である。
 開発支援装置100は、一例として、汎用的なコンピュータアーキテクチャに準じて構成されるコンピュータからなる。開発支援装置100は、CPU(Central Processing Unit)やMPU(Micro-Processing Unit)などの制御装置102と、主メモリ104と、不揮発性の記憶装置110と、通信インターフェイス111と、I/O(Input/Output)インターフェイス114と、表示インターフェイス120とを含む。これらのコンポーネントは、内部バス125を介して互いに通信可能に接続されている。
 制御装置102は、記憶装置110に格納されている開発支援プログラム110Aを主メモリ104に展開して実行することで、開発ツール30における各種処理を実現する。開発支援プログラム110Aは、ユーザプログラム210の開発環境を提供するためのプログラムである。記憶装置110は、開発支援プログラム110Aの他にも、開発ツール30で生成された各種データなどを格納する。当該データは、たとえば、開発ツール30上で設計された上述のユーザプログラム210や、上述の設定情報212などを含む。
 通信インターフェイス111は、他の通信機器との間でネットワークを介してデータを遣り取りする。当該他の通信機器は、たとえば、コントローラ200、外部機器400、サーバなどを含む。開発支援装置100は、通信インターフェイス111を介して、当該他の通信機器から、開発支援プログラム110Aなどの各種プログラムをダウンロード可能なように構成されてもよい。
 I/Oインターフェイス114は、操作部115に接続され、操作部115からのユーザ操作を示す信号を取り込む。操作部115は、典型的には、キーボード、マウス、タッチパネル、タッチパッドなどからなり、ユーザからの操作を受け付ける。
 表示インターフェイス120は、表示部121と接続され、制御装置102などからの指令に従って、表示部121に対して、画像を表示するための画像信号を送出する。表示部121は、LCD(Liquid Crystal Display)や有機EL(Electro Luminescence)ディスプレイなどからなり、ユーザに対して各種情報を提示する。表示部121には、開発ツール30によって提供される各種画面(たとえば、上述のプログラム設計画面31や上述のテーブル設定画面33)が表示され得る。図11の例では、開発支援装置100および表示部121が別体として示されているが、開発支援装置100および表示部121は、一体的に構成されてもよい。
  (D2.コントローラ200のハードウェア構成)
 次に、図12を参照して、コントローラ200のハードウェア構成について説明する。図12は、コントローラ200のハードウェア構成の一例を示す模式図である。
 コントローラ200は、通信インターフェイス201と、CPUやMPUなどの制御装置202と、チップセット204と、主メモリ206と、不揮発性の記憶装置208と、内部バスコントローラ222と、フィールドバスコントローラ224と、メモリカードインターフェイス239とを含む。
 制御装置202は、記憶装置208に格納された制御プログラム211を読み出して、主メモリ206に展開して実行することで、ロボットコントローラ300Aやサーボドライバ300Bなどに対する任意の制御を実現する。制御プログラム211は、コントローラ200を制御するための各種プログラムを含む。一例として、制御プログラム211は、システムプログラム209およびユーザプログラム210などを含む。システムプログラム209は、データの入出力処理や実行タイミング制御などの、コントローラ200の基本的な機能を提供するための命令コードを含む。ユーザプログラム210は、開発支援装置100からダウンロードされたものである。ユーザプログラム210は、制御対象に応じて任意に設計され、シーケンス制御を実行するためのシーケンスプログラム210Aおよびモーション制御を実行するためのモーションプログラム210Bとを含む。
 チップセット204は、各コンポーネントを制御することで、コントローラ200全体としての処理を実現する。
 記憶装置208は、制御プログラム211の他にも種々のデータを格納する。一例として、記憶装置208は、上述の設定情報212やデータ型の対応関係213などを格納する。データ型の対応関係213の詳細については後述の「第2の実施の形態」で説明する。
 内部バスコントローラ222は、コントローラ200と内部バスを通じて連結される各種デバイスとデータを遣り取りするインターフェイスである。このようなデバイスの一例として、I/Oユニット226が接続されている。
 フィールドバスコントローラ224は、コントローラ200とフィールドバスを通じて連結される各種の駆動機器300とデータを遣り取りするインターフェイスである。このようなデバイスの一例として、ロボットコントローラ300Aやサーボドライバ300Bが接続されている。他にも、視覚センサなどの駆動機器が接続されてもよい。
 内部バスコントローラ222およびフィールドバスコントローラ224は、接続されているデバイスに対して任意の指令を与えることができるとともに、デバイスが管理している任意のデータを取得することができる。また、内部バスコントローラ222および/またはフィールドバスコントローラ224は、ロボットコントローラ300Aやサーボドライバ300Bとの間でデータを遣り取りするためのインターフェイスとしても機能する。
 通信インターフェイス201(通信部)は、各種の有線/無線ネットワークを通じたデータの遣り取りを制御する。コントローラ200は、通信インターフェイス201を介して、開発支援装置100や外部機器400と通信を行う。また、コントローラ200は、通信インターフェイス201を介して、外部機器400上のデーターベース430にアクセスすることができる。
 メモリカードインターフェイス239は、外部記憶媒体の一例であるメモリカード240(たとえば、SDカード)を着脱可能に構成されており、メモリカード240に対してデータを書き込み、メモリカード240からデータを読出すことが可能になっている。
  (D3.外部機器400のハードウェア構成)
 次に、図13を参照して、外部機器400のハードウェア構成について説明する。図13は、外部機器400のハードウェア構成を示すブロック図である。
 外部機器400は、汎用的なアーキテクチャを有するハードウェア構成を有している。すなわち、外部機器400は、一種のパーソナルコンピュータとして実装される。但し、外部機器400を汎用的なハードウェアではなく、専用ハードウェアを用いて実装してもよい。
 より具体的には、外部機器400は、CPUやMPUなどの制御装置402と、主メモリ404と、不揮発性の記憶装置410と、通信インターフェイス412と、I/Oインターフェイス414と、表示インターフェイス420とを含む。これらのコンポーネントは、内部バス425を介して、互いにデータ通信可能に接続されている。
 制御装置402は、記憶装置410に格納された制御プログラム(図示しない)を読み出して、主メモリ404に展開して実行することで、外部機器400を制御する。すなわち、制御装置402は、主メモリ404および記憶装置410と連係することで、制御演算を実行する制御部を実現する。
 通信インターフェイス412、I/Oインターフェイス414、および、フィールドバスインターフェイス416は、外部機器400と他の通信機器とのデータの遣り取りを仲介する。
 より具体的には、通信インターフェイス412は、ネットワークNW1(図1参照)などを介した、コントローラ200との通信を仲介する。通信インターフェイス412には、たとえば、EtherNETに従う通信が可能なコンポーネントが採用され得る。
 I/Oインターフェイス414は、操作部415に接続され、操作部415からのユーザ操作を示す信号を取り込む。操作部415は、典型的には、キーボード、マウス、タッチパネル、タッチパッドなどからなり、ユーザからの操作を受け付ける。
 表示インターフェイス420は、表示部421と接続され、制御装置402などからの指令に従って、表示部421に対して、画像を表示するための画像信号を送出する。表示部421は、LCDや有機ELディスプレイなどからなり、ユーザに対して各種情報を提示する。図13の例では、外部機器400および表示部421が別体として示されているが、外部機器400および表示部421は、一体的に構成されてもよい。
 <E.第1の実施の形態のまとめ>
 以上のようにして、本実施の形態に従う開発支援装置100は、収集対象の変数を指定するための設定と、収集対象の各変数のデータ型に対応するデーターベース430上でのデータ型を指定するための設定と、収集対象の各変数についてデーターベース430上での識別名を指定するための設定とを受け付けるように構成されている。これらの設定は、設定情報212として開発支援装置100からコントローラ200に転送される。
 コントローラ200は、開発支援装置100から受信した設定情報212に規定されるデーターベース430上での識別名と、当該識別名に対応するデーターベース430上でのデータ型とに基づいて、テーブル432をデーターベース430上に生成するためのSQL文230を外部機器400に出力する。これにより、外部機器400のデーターベース430上にテーブル432が自動で生成される。
 このように、ユーザは、収集対象の変数と、各変数のデータ型に対応するデーターベース430上でのデータ型とを指定すれば、データーベース430上にテーブル432を生成することができる。そのため、ユーザは、テーブル432を生成するにあたってSQL文230を記述する必要がない。したがって、SQLの知識がないユーザであってもデーターベース430を容易に構築することできる。
 <F.付記>
 以上のように、本実施形態は以下のような開示を含む。
 [構成1]
 データーベース(430)にアクセスすることが可能なコントローラ(200)と、
 前記コントローラ(200)と通信可能に構成されている開発支援装置(100)とを備え、
 前記開発支援装置(100)には、前記コントローラ(200)の制御プログラムの開発を支援するための開発ツール(30)がインストールされ得、
 前記開発ツール(30)は、前記制御プログラムに含まれる変数の内から収集対象の変数を指定するための設定と、当該収集対象の各変数について前記データーベース(430)上での識別名を指定するための設定とを設定情報(212)として受け付けるように構成されており、
 前記コントローラ(200)または前記開発ツール(30)は、前記開発支援装置(100)から受信した前記設定情報(212)に規定される前記データーベース(430)上での識別名と、当該識別名に対応する前記データーベース(430)上でのデータ型とに基づいて、前記収集対象の変数の格納先となるテーブル(432)を前記データーベース(430)上に生成するためのSQL文を出力するための生成モジュール(250)を含む、制御システム。
 [構成2]
 前記開発ツール(30)は、前記収集対象の各変数が設定されたことに基づいて、当該変数のデータ型を表示するように構成されている、構成1に記載の制御システム。
 [構成3]
 前記開発ツール(30)は、前記収集対象として指定された変数の内から主キーを指定するための設定をさらに受け付けるように構成されている、構成1または2に記載の制御システム。
 [構成4]
 前記開発ツール(30)は、前記収集対象として指定された変数に構造体が含まれている場合、当該構造体に含まれる各メンバについて、前記データーベース(430)上での識別名の指定とを受け付けるように構成されている、構成1~3のいずれか1項に記載の制御システム。
 [構成5]
 前記生成モジュール(250)は、前記構造体の各メンバについて決定された前記識別名を前記テーブル(432)とは別のテーブルに登録するように前記SQL文を生成する、構成4に記載の制御システム。
 [構成6]
 前記生成モジュール(250)は、前記構造体の識別名を外部キーとして前記テーブル(432)に登録するための命令コードを前記SQL文に含める、構成5に記載の制御システム。
 [構成7]
 制御プログラムの開発を支援するための開発支援装置(100)と通信可能に構成されており、データーベース(430)にアクセスすることが可能なコントローラ(200)であって、
 前記開発支援装置(100)には、前記制御プログラムの開発を支援するための開発ツール(30)がインストールされ得、
 前記開発ツール(30)は、前記制御プログラムに含まれる変数の内から収集対象の変数を指定するための設定と、当該収集対象の各変数について前記データーベース(430)上での識別名を指定するための設定とを設定情報(212)として受け付けるように構成されており、
 前記コントローラ(200)は、
  前記設定情報(212)および前記制御プログラムを前記開発支援装置(100)から受信するための通信部と、
  前記開発支援装置(100)から受信した前記制御プログラムに従って制御対象の駆動機器を制御するためのプログラム実行モジュールと、
  前記開発支援装置(100)から受信した前記設定情報(212)に規定される前記データーベース(430)上での識別名と、当該識別名に対応する前記データーベース(430)上でのデータ型とに基づいて、前記収集対象の変数の格納先となるテーブル(432)を前記データーベース(430)上に生成するためのSQL文を出力するための生成モジュール(250)とを備える、コントローラ。
 [構成8]
 制御プログラムの開発を支援するための開発支援装置(100)と通信可能に構成されており、データーベース(430)にアクセスすることが可能なコントローラ(200)の制御方法であって、
 前記開発支援装置(100)には、前記制御プログラムの開発を支援するための開発ツール(30)がインストールされ得、
 前記開発ツール(30)は、前記制御プログラムに含まれる変数の内から収集対象の変数を指定するための設定と、当該収集対象の各変数について前記データーベース(430)上での識別名を指定するための設定とを設定情報(212)として受け付けるように構成されており、
 前記制御方法は、
  前記設定情報(212)および前記制御プログラムを前記開発支援装置(100)から受信するステップと、
  前記開発支援装置(100)から受信した前記制御プログラムに従って制御対象の駆動機器を制御するステップと、
  前記開発支援装置(100)から受信した前記設定情報(212)に規定される前記データーベース(430)上での識別名と、当該識別名に対応する前記データーベース(430)上でのデータ型とに基づいて、前記収集対象の変数の格納先となるテーブル(432)を前記データーベース(430)上に生成するためのSQL文を出力するステップとを備える、制御方法。
 ≪第2の実施の形態≫
 <G.概要>
 第1の実施の形態においては、ユーザは、テーブル432を生成するための設定をテーブル設定画面33に対して行い、その設定に従って、テーブル生成用のSQL文230が生成されていた。これに対して、第2の実施の形態においては、SQL文230を生成するための機能がユーザプログラム210に組み込むことができる機能モジュールとして提供される。すなわち、ユーザは、プログラム設計画面31(図3参照)上において、当該機能モジュールを他の機能モジュールと組み合わせて利用することができる。
 第2の実施の形態に従う制御システム10のハードウェア構成などその他の点については第1の実施の形態に従う制御システム10と同じであるので、以下ではそれらの説明については繰り返さない。
 <H.適用例>
 図14および図15を参照して、本発明の他の適用例について説明する。図14は、第2の実施の形態に従う制御システム10の構成例を示す図である。
 図14に示されるように、制御システム10は、1つ以上の開発支援装置100と、1つ以上のコントローラ200と、1つ以上の駆動機器300と、1つ以上の外部機器400とで構成されている。コントローラ200は、ハードウェア構成として、制御装置202と、記憶装置208とを含む。制御装置202は、機能構成として、プログラム実行モジュール252を含む。
 本実施の形態に従う開発支援装置100は、SQL文230を生成するための機能がファンクションブロックなどの機能モジュールとして提供される。図14の例では、当該機能モジュールが生成モジュール250として示されている。ユーザは、上述のプログラム設計画面31(図3参照)上において、生成モジュール250を他の機能モジュールと組み合わせて利用することができる。
 開発支援装置100は、ダウンロード操作を受け付けたことに基づいて、生成モジュール250が組み込まれたユーザプログラム210をコントローラ200に転送する。コントローラ200は、開発支援装置100から受信したユーザプログラム210を記憶装置208に保存する。
 プログラム実行モジュール252は、ユーザプログラム210の実行開始命令を受け付けたことに基づいて、ユーザプログラム210の実行を開始する。プログラム実行モジュール252は、生成モジュール250の実行タイミングが到来したことに基づいて、生成モジュール250によるSQL文230の生成機能を実行する。
 図15を参照して、生成モジュール250によるSQL文230の生成機能について説明する。図15は、生成モジュール250によるSQL文230の生成処理を概略的に示す図である。
 生成モジュール250は、記憶装置208に格納されている対応関係213と、収集対象変数229とを入力として、SQL文230を生成する。
 対応関係213は、ユーザプログラム210で利用され得るデータ型と、データーベース430で利用され得るデータ型との対応関係を規定している。対応関係213は、予め規定されていてもよいし、ユーザによって任意に編集されてもよい。典型的には、対応関係213は、必要に応じてサーバからダウンロードされる。
 収集対象変数229は、上述のプログラム設計画面31(図3参照)で設計されているユーザプログラム210上において収集対象として指定されたものである。図15の例では、変数「A」~「F」が収集対象として指定されている。
 生成モジュール250は、収集対象の各変数についてデーターベース430上での識別名を決定する。ある局面において、生成モジュール250は、変数名と同じになるように識別名を決定する。他の局面において、生成モジュール250は、変数名に予め定められたキーワードを付加したものを識別名として決定する。一例として、変数「A」~「F」に対するデーターベース430上での識別名は、カラム名「A’」~「F’」に決定されたとする。なお、カラム名の決定方法は、これらに限定されず任意の決定方法が採用され得る。
 次に、生成モジュール250は、対応関係213に基づいて、収集対象の各変数について、当該変数のデータ型に対応するデーターベース430上でのデータ型を特定する。その結果、「DINT」型の変数「A」については、「Number(10)」型が対応するデータ型として特定される。「String(128)」型の変数「B」については、「nchar(127)」型が対応するデータ型として特定される。「Int」型の変数「C」については、「Number(5)」型が対応するデータ型として特定される。「String(20)」型の変数「D」については、「nchar(19)」型が対応するデータ型として特定される。「bool」型の変数「E」については、「Number(1)」型が対応するデータ型として特定される。「DATE_AND_TIME」型の変数「F」については、「TIMESTAMP」型が対応するデータ型として特定される。
 続いて、生成モジュール250は、収集対象の各変数について決定された識別名と、収集対象の各変数について特定されたデーターベース430上でのデータ型とに基づいて、SQL文230を生成する。より具体的には、生成モジュール250は、変数「A」について特定された識別名「A’」と、変数「A」について特定されたデーターベース430上でのデータ型「Number(10)」とに基づいて、「A’ Number(10)」との記述をSQL文230に反映する。この記述により、識別名「A’」のカラムがテーブル432に追加される。同様に、生成モジュール250は、識別名「B’」~「F’」のカラムを追加するための記述をSQL文230に反映する。
 生成されたSQL文230は、外部機器400に転送される。DBMSとしての外部機器400は、コントローラ200から受信したSQL文230を解釈し、SQL文230に従ってデーターベース430上にテーブル432を生成する。
 以上のようにして、テーブル生成用のSQL文230が自動生成される。ユーザは、収集対象の変数を生成モジュール250の入力とするようにユーザプログラム210を組むだけで収集対象の変数を要素とするテーブル432を生成することができる。このように、ユーザは、SQL文を記述せずにデーターベース430上にテーブル432を生成することができる。
 なお、上述では、ユーザプログラム210に含まれる変数を元にテーブル432を生成する例について説明を行ったが、ユーザプログラム210以外にも、コントローラ200内の各種制御プログラムに含まれる変数を元にテーブル432が生成されてもよい。
 また、図14の例では、データーベース430が外部機器400に存在する例について説明を行ったが、データーベース430は、必ずしも、外部機器400に存在する必要はない。たとえば、データーベース430は、コントローラ200の内部に存在していてもよい。あるいは、データーベース430は、コントローラ200の内部バスに繋がれた別ユニットの内部に存在していてもよい。
 また、図15に示される対応関係213においては、ユーザプログラム210上のデータ型とデーターベース430上のデータ型とが1対1で対応付けられている例について説明を行ったが、複数種類のデーターベース430に対応させる場合には、ユーザプログラム210上のデータ型とデーターベース430上のデータ型とが1対N(≧2)で対応付けられてもよい。
 <I.シーケンスフロー>
 図16および図17を参照して、テーブル432の生成処理に係る処理フローについて説明する。図16は、第2の実施の形態における、開発支援装置100とコントローラ200と駆動機器300と外部機器400との間のデータの流れを示すシーケンス図である。
 ステップS10において、開発支援装置100は、開発ツール30の起動命令を受け付けたとする。このことに基づいて、開発支援装置100は、上述のプログラム設計画面31(図3参照)を表示する。プログラム設計画面31については図3で説明した通りであるので、その説明については繰り返さない。設計者は、プログラム設計画面31上において、テーブル生成のための生成モジュール250をユーザプログラム210に組み込むことができる。
 ステップS30において、開発ツール30は、コンパイル操作を受け付けたとする。このことに基づいて、開発ツール30は、プログラム設計画面31上で設計されたユーザプログラム210をコンパイルする。その後、開発ツール30は、コンパイル結果のダウンロード操作を受け付けたとする。このことに基づいて、開発ツール30は、コンパイルされたユーザプログラム210をコントローラ200に転送する。コントローラ200は、受信したユーザプログラム210を記憶装置208(図14参照)に保存する。
 ステップS32において、コントローラ200は、ユーザプログラム210の実行命令を受け付けたとする。このことに基づいて、コントローラ200は、ユーザプログラム210の実行を開始する。ユーザプログラム210がサイクリック実行型のプログラムである場合、コントローラ200は、予め定められた制御周期ごとにユーザプログラム210に含まれる命令群を繰り返し実行する。より具体的には、コントローラ200は、ユーザプログラム210の先頭行から最終行までを1制御周期で実行する。その次の制御周期では、コントローラ200は、再び、ユーザプログラム210の先頭行から最終行までを実行する。コントローラ200は、制御周期ごとに指令値を生成し、当該指令値を駆動機器300に出力する。
 ステップS40において、コントローラ200は、テーブル生成処理の実行命令を受け付けたか否かを判断する。コントローラ200は、ユーザプログラム210に規定されている生成モジュール250が実行された場合に、テーブル生成処理の実行命令を受け付けたと判断する。コントローラ200は、生成モジュール250が実行されたと判断した場合(ステップS40においてYES)、制御をステップS42に切り替える。そうでない場合には(ステップS40においてNO)、コントローラ200は、制御をステップS50に切り替える。
 ステップS42において、コントローラ200の生成モジュール250は、テーブル生成のためのSQL文230を生成する。なお、ステップS42では、SQL文230がコントローラ200によって生成される例について示されているが、SQL文230は、開発ツール30によって生成されてもよい。図17は、第2の実施の形態におけるSQL文230の生成処理を概略的に示す図である。
 図17に示されるように、コントローラ200の生成モジュール250は、上述の対応関係213(図15参照)と、上述の収集対象変数229(図15参照)と、その他の各種設定とを入力として、SQL文230を生成する。
 より具体的には、生成モジュール250は、収集対象の各変数についてデーターベース430上での識別名を決定する。生成モジュール250は、たとえば、変数「A」~「F」に対するデーターベース430上での識別名をカラム名「A’」~「F’」に決定したとする。ある局面において、生成モジュール250は、収集対象の各変数の変数名と同一の名前をデーターベース430上での識別名として決定する。この場合、カラム名「A’」~「F’」は、それぞれ、変数名「A」~「F」と同じになる。他の局面において、生成モジュール250は、収集対象の各変数の変数名を含む名前をデーターベース430上での前記識別名として決定する。この場合、それぞれ、変数名「A」~「F」のそれぞれに所定のキーワードを付加したものがカラム名「A’」~「F’」となる。変数名がデーターベース430上の識別名に表わされることで、ユーザは、各変数に対応するカラムを容易に把握することができる。
 次に、生成モジュール250は、対応関係213に基づいて、収集対象の各変数について、データーベース430上での対応するデータ型を特定する。
 続いて、生成モジュール250は、収集対象の各変数について決定された識別名と、収集対象の各変数について特定されたデーターベース430上でのデータ型とに基づいて、SQL文230を生成する。より具体的には、生成モジュール250は、変数「A」について特定された識別名「A’」と、変数「A」について特定されたデーターベース430上でのデータ型「Number(10)」とに基づいて、「A’ Number(10)」との記述をSQL文230に反映する。この記述により、識別名「A’」のカラムがテーブル432に追加される。同様に、生成モジュール250は、識別名「B’」~「F’」のカラムを追加するための記述をSQL文230に反映する。
 また、生成モジュール250は、入力される各種設定をSQL文230に反映する。一例として、当該各種設定は、生成されるテーブルに付与されるテーブル名の設定や、主キーとして指定するカラムの設定や、各カラムに対してNULLの入力を許容するか否かの設定を含む。
 たとえば、テーブル名として「TABLE1」が指定されたとする。この場合、生成モジュール250は、「Create Table TABLE1」との記述をSQL文230に反映する。この記述により、生成されるテーブル432のテーブル名が「TABLE1」となる。
 また、主キーとして変数「A」,「B」が設定されたとする。この場合、生成モジュール250は、「PRIMARY KEY (A’、B’)」との記述をSQL文230に追加する。この記述により、変数「A」に対応するカラム「A’」と、変数「B」に対応するカラム「B’」が主キーとして設定される。このように、SQL文230は、指定された変数に対応するデーターベースでの識別名を主キーにとしてテーブルに登録するための命令文を含む。
 また、変数「A」,「B」についてはNULL禁止が設定されたとする。この場合、生成モジュール250は、カラム「A’」,「B’」について「NOT NULL」との記述を付す。これにより、変数「A」,「B」に対応するカラム「A’」,「B’」についてはNULL指定が禁止される。
 以上により、生成モジュール250は、テーブル生成のためのSQL文230を自動生成する。好ましくは、生成モジュール250は、SQL文230の他に、対応付け結果であるマッピングテーブル232をさらに出力する。
 マッピングテーブル232は、収集対象の各変数について、変数のデータ型と、データーベース430上での識別名と、データーベース430上のデータ型との対応付け結果を示す。好ましくは、マッピングテーブル232は、いずれのカラムが主キーとして設定されているか否かを示すフラグと、各カラムに対するNULL指定が禁止されているか否かを示すフラグとをさらに含む。このようなマッピングテーブル232が出力されることで、ユーザは、収集対象の各変数について対応付けられたカラム名や、収集対象の各変数のデータ型などを容易に把握することができる。
 生成されたSQL文230は、外部機器400に送信される。再び図16を参照して、ステップS44において、外部機器400は、コントローラ200からSQL文230を受信したことに基づいて、当該SQL文230に従ってテーブル432を生成する。その結果、上述の図6に示される空のテーブル432がデーターベース430上に生成される。
 ステップS50において、コントローラ200は、ユーザプログラム210に規定される指令値の生成処理の実行命令を受け付けたか否かを判断する。コントローラ200は、当該実行命令を受け付けたと判断した場合(ステップS50においてYES)、規定されている命令に従って指令値を生成し、当該指令値を駆動機器300に送る(ステップS52)。駆動機器300は、コントローラ200から受信した指令値に従って制御対象を駆動する。コントローラ200は、指令値の生成処理の実行命令を受け付けたと判断しなかった場合(ステップS50においてNO)、コントローラ200は、ステップS52の処理を実行せずに、制御をステップS60に切り替える。
 ステップS60において、コントローラ200は、収集対象の変数のアップロード処理の実行命令を受け付けたか否かを判断する。コントローラ200は、当該実行命令を受け付けたと判断した場合(ステップS60においてYES)、INSERT命令を実行するためのSQL文を生成する。当該SQL文には、追加先のテーブルを指定するための情報(たとえば、テーブル名)や、各カラムにアップロードするデータの値などが規定される。
 ステップS62において、コントローラ200は、生成したSQL文を外部機器400に送る。外部機器400は、コントローラ200から受信したSQL文に従って各カラムに変数値を反映したレコードを生成し、ステップS24で生成されたテーブル432に生成したレコードを追加する。これにより、収集対象の変数がテーブル432に反映される。その後、外部機器400は、正常終了または異常終了を示すアップロード結果をコントローラ200に送信する。
 コントローラ200は、収集対象の変数のアップロード処理の実行命令を受けていない場合(ステップS60においてNO)、ステップS62の処理を実行せずに、処理をステップS70に切り替える。
 ステップS70において、コントローラ200は、ユーザプログラム210の実行を終了するか否かを判断する。当該終了命令は、たとえば、ユーザから終了操作を受け付けたことに基づいて発せられる。コントローラ200は、ユーザから終了操作を受け付けたと判断した場合(ステップS70においてYES)、ユーザプログラム210の実行を終了する。そうでない場合には(ステップS70においてNO)、コントローラ200は、制御をステップS40に戻す。
 なお、上述では、ステップS62において、INSERT命令のSQL文がコントローラ200から外部機器400のデーターベース430に送信される例について説明を行ったが、INSERTする値のみが外部機器400のデーターベース430に送られてもよい。この場合、外部機器400は、INSERTする値を受信したことに基づいて、INSERT命令のSQL文を生成し、当該SQL文に基づいて受信した値のINSERT処理を実行する。
 <J.テーブル生成FB>
 上述のように、開発支援装置100は、テーブル生成のためのSQL文230を生成する機能を生成モジュール250として提供する。生成モジュール250は、たとえば、ファンクションブロック(FB:Function Black)で提供される。
 図18を参照して、ファンクションブロックとして提供される生成モジュール250について説明する。図18は、生成モジュール250の一例であるテーブル生成FB251を示す図である。
 なお、生成モジュール250は、ファンクションブロック以外で規定されてもよい。たとえば、生成モジュール250は、ラダーダイアグラムで規定されるもの、命令リスト、構造化テキスト、および、シーケンシャルファンクションチャートのいずれか、あるいは、これらの組み合わせで規定されるものも含み得る。また、生成モジュール250は、JavaScriptやC言語のような汎用的なプログラミング言語で規定されるものも含み得る。
 テーブル生成FB251は、SQL文230の生成に関する設定を受け付ける入力部255A~255Eと、SQL文230の生成結果を出力するための出力部256A~256Fとを含む。
 「Excute」として示される入力部255Aは、SQL文の生成処理を実行するか否かを指定するための設定を受け付ける。一例として、入力部255Aは、「BOOL」型の入力を受け付けるように規定されている。入力部255Aに「FALSE」が入力されている限り、SQL文の生成処理は、実行されない。一方で、入力部255Aに「TRUE」が入力された場合には、SQL文の生成処理が実行される。
 「DBConnection」として示される入力部255Bは、データーベース430に接続するためのファンクションブロックを実行して得られる接続結果を受け付ける。当該接続結果には、データーベース430のアクセスするための情報(たとえば、データーベース名など)が含まれている。
 「TableName」として示される入力部255Cは、テーブル名の設定を受け付ける。入力部255Eは、たとえば、「DWORD」型の変数を受け付けるように規定されている。
 「MappingVariableList」として示される入力部255Dは、収集対象の変数の入力を受け付ける。入力部255Dは、予め定義された構造体を受け付けるように規定されている。入力部255Dには、上述の収集対象変数229(図17参照)が入力される。
 「PrimaryKey」として示される入力部255Eは、主キーを設定するための入力を受け付ける。入力部255Eは、たとえば、「String」型の変数を受け付けるように規定されている。このように、テーブル生成FB251は、収集対象の変数の内のいずれかを主キーとして指定するための入力を受け付けるように規定されている。
 SQL文230が正常に生成された場合には、正常終了を示す信号が、「Done」として示される出力部256Aから出力される。SQL文230の生成中には、生成処理中を示す信号が、「Busy」として示される出力部256Bから出力される。SQL文230が正常に生成されなかった場合には、異常終了を示す信号が、「Error」として示される出力部256Cから出力される。この場合には、さらに、エラーの内容を識別するためのエラーIDが、「ErrorID」として示される出力部256Dから出力される。「SQLStatement」として示される出力部256Eからは、テーブル生成FB251の実行によって生成されたSQL文230(図17参照)が出力される。「MappingTable」として示される出力部256Fからは、テーブル生成FB251の実行によって生成されたマッピングテーブル232(図17参照)が出力される。
 <K.テーブル生成パターンの変形例>
 図19を参照して、SQL文230の生成パターンの変形例について説明する。図19は、変形例におけるSQL文230の生成処理を概略的に示す図である。
 上述の図17では、生成モジュール250は、対応関係213と、収集対象変数229とを入力として、テーブル生成のためのSQL文230と、マッピングテーブル232とを生成していた。これに対して、変形例に従う生成パターンでは、生成モジュール250Aは、マッピングモジュール248によって生成されたマッピングテーブル232を入力としてSQL文230を出力する。その他の点については上述の通りであるので、以下では、それらの説明については繰り返さない。
 マッピングモジュール248は、ユーザプログラム210に組み込まれ得るプログラムモジュールである。マッピングモジュール248は、対応関係213と、収集対象変数229とを入力として、マッピングテーブル214を生成する。
 より具体的には、マッピングモジュール248は、収集対象の各変数についてデーターベース430上での識別名を決定する。マッピングモジュール248は、変数「A」~「F」に対するデーターベース430上での識別名をカラム名「A’」~「F’」に決定したとする。ある局面において、マッピングモジュール248は、収集対象の各変数の変数名と同一の名前をデーターベース430上での識別名として決定する。この場合、カラム名「A’」~「F’」は、それぞれ、変数名「A」~「F」と同じになる。他の局面において、マッピングモジュール248は、収集対象の各変数の変数名を含む名前をデーターベース430上での前記識別名として決定する。この場合、それぞれ、変数名「A」~「F」のそれぞれに所定のキーワードを付加したものがカラム名「A’」~「F’」となる。
 続いて、マッピングモジュール248は、対応関係213に基づいて、収集対象の各変数について、当該変数のデータ型に対応するデーターベース430上でのデータ型を特定する。
 次に、マッピングモジュール248は、変数名「A」~「F」と、変数「A」~「F」のデータ型と、変数「A」~「F」のデーターベース上での識別名と、変数名「A」~「F」のデーターベース上でのデータ型との対応関係をマッピングテーブル214として生成モジュール250Aに出力する。
 生成モジュール250Aは、マッピングテーブル232に規定されるデーターベース上での識別名と、当該識別名に対応するデーターベース上でのデータ型とに基づいて、SQL文230を生成する。生成モジュール250AによるSQL文230の生成方法については上述の通りであるので、その説明については繰り返さない。
 <L.マッピングFB>
 図19に示されるマッピングモジュール248は、たとえば、ファンクションブロック(FB)で提供される。以下では、図20を参照して、ファンクションブロックとして提供されるマッピングモジュール248について説明する。図20は、マッピングモジュール248の一例であるマッピングFB249を示す図である。
 なお、マッピングモジュール248は、ファンクションブロック以外で規定されてもよい。たとえば、マッピングモジュール248は、ラダーダイアグラムで規定されるもの、命令リスト、構造化テキスト、および、シーケンシャルファンクションチャートのいずれか、あるいは、これらの組み合わせで規定されるものも含み得る。また、マッピングモジュール248は、JavaScriptやC言語のような汎用的なプログラミング言語で規定されるものも含み得る。
 マッピングFB249は、マッピングテーブル214の生成に関する設定を受け付ける入力部258A,258Bと、マッピングテーブル214の生成結果を出力するための出力部259A~259Eとを含む。
 「Excute」として示される入力部258Aは、マッピングテーブル214の生成処理を実行するか否かを指定するための設定を受け付ける。一例として、入力部258Aは、「BOOL」型の入力を受け付けるように規定されている。入力部258Aに「FALSE」が入力されている限り、マッピングテーブル214の生成処理は、実行されない。一方で、入力部258Aに「TRUE」が入力された場合には、マッピングテーブル214の生成処理が実行される。
 「MappingVariableList」として示される入力部258Bは、収集対象の変数の入力を受け付ける。入力部258Bは、予め定義された構造体を受け付けるように規定されている。入力部258Bには、構造体として定義される収集対象変数229(図19参照)が入力される。
 マッピングテーブル214が正常に生成された場合には、正常終了を示す信号が、「Done」として示される出力部259Aから出力される。マッピングテーブル214の生成中には、生成処理中を示す信号が、「Busy」として示される出力部259Bから出力される。マッピングテーブル214が正常に生成されなかった場合には、異常終了を示す信号が、「Error」として示される出力部259Cから出力される。この場合には、さらに、エラーの内容を識別するためのエラーIDが、「ErrorID」として示される出力部259Dから出力される。「MappingTable」として示される出力部259Eからは、マッピングFB249の実行によって生成されたマッピングテーブル232(図19参照)が出力される。
 <M.テーブル生成FBの変形例>
 図19に示される生成モジュール250Aは、たとえば、ファンクションブロック(FB)で提供される。以下では、図21を参照して、ファンクションブロックとして提供される生成モジュール250Aについて説明する。図21は、生成モジュール250Aの一例であるテーブル生成FB251Aを示す図である。
 テーブル生成FB251Aは、SQL文230の生成に関する設定を受け付ける入力部255A~255C,255D2,255Eと、SQL文230の生成結果を出力するための出力部256A~256Fとを含む。入力部255D2以外の構成については、図18に示されるテーブル生成FB251と同じであるので、以下では、入力部255D2以外の説明については繰り返さない。
 「MappingValue」として示される入力部255D2は、上述のマッピングFB249(図20参照)によって生成されるマッピングテーブル232を入力として受け付ける。
 テーブル生成FB251Aは、入力部255A~255C,255D2,255Eに入力された情報に従ってSQL文230を生成する。テーブル生成FB251AによるSQL文230の生成方法については図19で説明した通りであるので、その説明については繰り返さない。
 <N.生成モジュール250による生成パターン>
 収集対象の変数には、構造体が含まれる場合がある。生成モジュール250は、収集対象の変数に構造体が含まれる場合には、そうではない場合と異なる態様でテーブル生成のためのSQL文230を生成する。収集対象の変数に構造体が含まれる場合におけるテーブル432の生成処理として、たとえば、2つの生成パターン(生成パターン3,4)が考えられる。
 生成パターン3においては、生成モジュール250は、構造体ではない変数を管理するためのテーブルと、構造体に含まれるメンバ変数を管理するためのテーブルとを別々に生成する。生成パターン4においては、生成モジュール250は、構造体ではない変数と構造体に含まれるメンバ変数とを共通に管理するための1つのテーブルを生成する。
 以下では、図22および図23を参照して、第2の実施の形態における生成パターン3,4について順に説明する。
  (M1.テーブルの生成パターン3)
 まず、第2の実施の形態における生成パターン3について説明する。図22は、第2の実施の形態に従うテーブルの生成パターン3を概略的に示す図である。
 生成モジュール250は、データ型の対応関係213と収集対象変数229とを入力として、「TABLE1」を生成するためのSQL文230Aと、「TABLE2」を生成するためのSQL文230Bとを生成している。
 より具体的には、生成モジュール250は、収集対象の各変数についてデーターベース430上での識別名を決定する。このとき、生成モジュール250は、収集対象の変数に構造体が含まれている場合には、構造体名についてデーターベース430上での識別名を決定するとともに、構造体の各メンバについてデーターベース430上での識別名を決定する。その結果、収集対象の変数「A」,「B」に対するデーターベース430上での識別名は、カラム名「A’」,「B’」に決定されたとする。また、構造体「C」に対するデーターベース430上での識別名は、カラム「C’」に決定されたとする。また、収集対象の構造体「C」のメンバ変数「α」~「γ」に対するデーターベース430上での識別名は、カラム名「α’」~「γ’」に決定されたとする。
 次に、生成モジュール250は、対応関係213に基づいて、収集対象の各変数について、当該変数のデータ型に対応するデーターベース430上でのデータ型を特定する。
 続いて、生成モジュール250は、収集対象の各変数について決定された識別名と、収集対象の各変数について特定されたデーターベース430上でのデータ型とに基づいて、SQL文230を生成する。このとき、生成モジュール250は、収集対象の変数名について決定された識別名「A’」,「B’」と、構造体名について決定された識別名「C’」とをテーブル「TABLE1」に登録するようにSQL文230Aを生成する。また、生成モジュール250は、構造体の各メンバ変数について決定された識別名「α’」~「γ’」をテーブル「TABLE1」とは別のテーブル「TABLE2」に登録するようにSQL文230Bを生成する。
 より具体的には、生成モジュール250は、変数「A」について決定された識別名「A’」と、変数「A」に対応するデーターベース上でのデータ型「Number(10)」とに基づいて、「A’ Number(10)」との記述をSQL文230Aに反映する。この記述により、識別名「A’」のカラムがテーブルに追加される。同様に、生成モジュール250は、識別名「B’」,「C’」のカラムを追加するための記述をSQL文230Aに反映する。
 また、生成モジュール250は、構造体名について決定されたカラム名「C’」を外部キーとしてテーブル「TABLE2」に登録するための命令コードをSQL文230Aに含める。図22の例では、「FOREIGN KEY(C’) REFERENCES TABLE2」との記述がSQL文230Aに追加されている。この記述により、カラム「C’」が「TABLE2」を参照する外部キーとして規定される。
 続いて、生成モジュール250は、構造体「C」に含まれるメンバ変数「α」,「β」,「γ」については、カラム「C’」,「α’」,「β’」,「γ’」を追加するための記述をSQL文230Aとは別のSQL文230Bに反映する。図22の例では、「C’ Number(5)」との記述と、「α’ Number(5)」との記述と、「β’ Number(5)」との記述と、「γ’ Number(5)」との記述とがSQL文230Bに反映されている。これらの記述により、この記述により、識別名「C’」,「α’」,「β’」,「γ’」のカラムが別テーブルに追加される。このとき、構造体名「C」に付けられたカラム名「C’」については、「PRIMARY KEY (C’)」との記述をSQL文230Bに追加する。この記述により、識別名「C’」のカラムが主キーとして設定される。
 以上により、生成モジュール250は、テーブル生成のためのSQL文230A,230Bを自動生成する。なお、図22では、収集対象の変数に1つの構造体が含まれている例について説明を行ったが、収集対象の変数に複数の構造体が含まれている場合には、構造体の数に応じてテーブルが生成されるようにSQL文が生成される。また、構造体のメンバに構造体が含まれている場合には、各構造体についてテーブルが生成されるようにSQL文が生成される。
 好ましくは、生成モジュール250は、SQL文230A,230Bの他に、対応付け結果であるマッピングテーブル232A,232Bをさらに出力する。
 マッピングテーブル232Aは、SQL文230Aの生成結果として生成される。マッピングテーブル232Aは、SQL文230Aで規定されたカラムに対応する変数名と、当該変数のデータ型と、当該カラムの識別名と、当該カラムのデータ型との対応付け結果を示す。また、マッピングテーブル232Aに規定される収集対象の各変数には、主キーであるか否かを示すフラグと、NULL指定が禁止されているか否かを示すフラグとが対応付けられている。
 マッピングテーブル232Bは、SQL文230Bの生成結果として生成される。マッピングテーブル232Bは、SQL文230Bで規定されたカラムに対応する変数名と、当該変数のデータ型と、当該カラムの識別名と、当該カラムのデータ型との対応付け結果を示す。また、マッピングテーブル232Bに規定される収集対象の各変数には、主キーであるか否かを示すフラグと、NULL指定が禁止されているか否かを示すフラグとが対応付けられている。
 マッピングテーブル232A,232Bが出力されることで、ユーザは、収集対象の各変数について対応付けられたカラム名や、収集対象の各変数のデータ型に対応するデーターベース上でのデータ型などを容易に把握することができる。
  (M2.テーブルの生成パターン4)
 次に、図23を参照して、収集対象の変数に構造体が含まれている場合におけるテーブル432の生成パターン4について説明する。図23は、第2の実施の形態に従うテーブルの生成パターン4を概略的に示す図である。
 収集対象変数229において、構造体「C」が収集対象の変数として指定されているとする。構造体「C」は、メンバ変数として、変数「α」,「β」,「γ」を含む。本生成例においては、生成モジュール250は、構造体ではない変数と、構造体に含まれるメンバ変数とを要素とする1つのテーブルを生成する。
 より具体的には、生成モジュール250は、収集対象の各変数についてデーターベース430上での識別名を決定する。このとき、生成モジュール250は、収集対象の変数に構造体が含まれている場合には、構造体ではない各変数と、構造体に含まれる各メンバ変数とについてデーターベース430上での識別名を決定する。その結果、収集対象の変数「A」,「B」に対するデーターベース430上での識別名は、カラム名「A’」,「B’」に決定されたとする。また、収集対象の構造体「C」のメンバ変数「α」~「γ」に対するデーターベース430上での識別名は、カラム名「α’」~「γ’」に決定されたとする。
 次に、生成モジュール250は、対応関係213に基づいて、構造体ではない各変数と、構造体に含まれる各メンバ変数とについて、データーベース430上での対応するデータ型を特定する。
 続いて、生成モジュール250は、収集対象の各変数について決定された識別名と、収集対象の各変数について特定されたデーターベース430上でのデータ型とに基づいて、SQL文230を生成する。このとき、収集対象の変数名について決定された識別名「A’」,「B’」,「α’」~「γ’」をテーブル「TABLE1」に登録するようにSQL文230Aを生成する。
 より具体的には、生成モジュール250は、変数「A」について決定された識別名「A’」と、変数「A」に対応するデーターベース上でのデータ型「Number(10)」とに基づいて、「A’ Number(10)」との記述をSQL文230Aに反映する。この記述により、識別名「A’」のカラムがテーブルに追加される。同様に、生成モジュール250は、識別名「B’」,「α’」~「γ’」のカラムを追加するための記述をSQL文230Aに反映する。
 以上により、生成モジュール250は、テーブル生成のためのSQL文230を自動生成する。好ましくは、生成モジュール250は、SQL文230の他に、対応付け結果であるマッピングテーブル232をさらに出力する。
 マッピングテーブル232は、SQL文230の生成結果として生成される。マッピングテーブル232は、SQL文230で規定されたカラムに対応する変数名と、当該変数のデータ型と、当該カラムの識別名と、当該カラムのデータ型との対応付け結果を示す。また、マッピングテーブル232に規定される収集対象の各変数には、主キーであるか否かを示すフラグと、NULL指定が禁止されているか否かを示すフラグとが対応付けられている。
 マッピングテーブル232が出力されることで、ユーザは、収集対象の各変数について対応付けられたカラム名や、収集対象の各変数のデータ型に対応するデーターベース上でのデータ型などを容易に把握することができる。
 <O.利点>
 図24および図25を参照して、比較例に従う制御システム10Xと比較することで、第2の実施の形態に従う制御システム10の利点について説明する。図24は、比較例に従う制御システム10Xによるテーブル生成に係る処理フローを示す図である。図25は、第2の実施の形態に従う制御システム10によるテーブル生成に係る処理フローを示す図である。
 比較例に従う制御システム10Xには、テーブルを自動生成するための生成モジュール250が搭載されていない。制御システム10Xにテーブルを登録し、収集対象のデータをテーブルにアップロードするためには、ユーザは、以下のステップS1~S6の操作を行う必要がある。
 (ステップS1)外部機器400上でテーブル生成のためのSQL文を記述し、データーベース430上に予めテーブルを登録する。
 (ステップS2)ステップS1でデーターベース430に登録したテーブルのデータ構造に合わせて、開発支援装置100の開発ツール30上で構造体変数を定義する。
 (ステップS3)ステップS2で定義した構造体変数を開発支援装置100に登録する。
 (ステップS4)上記ステップS2で定義した構造体変数の各メンバと、ステップS1でデーターベース430に登録したテーブルの各カラムとの対応関係をユーザプログラム210上で規定する。
 (ステップS5)ステップS3で登録した構造体変数に収集対象の変数をセットするようにユーザプログラム210を設計する。
 (ステップS6)ステップS5で収集対象の変数がセットされた構造体変数をデーターベース430にアップロードするようにユーザプログラム210を設計する。
 これに対して、本実施の形態に従う制御システム10においては、収集対象の変数を生成モジュール250に入力するようにユーザプログラム210が設計されば、データーベース430上にテーブルが自動で生成される。そのため、本実施の形態に従う制御システム10においては、図25に示されるように、上記ステップS1,S2,S3,S5の操作が必要なくなる。その結果、データーベース430に対する操作が容易になり、専門知識がないユーザであってもデーターベース430を設計することが可能になる。
 <P.第2の実施の形態のまとめ>
 以上のようにして、開発支援装置100は、テーブルを自動生成する機能を生成モジュール250として提供する。生成モジュール250は、収集対象の各変数についてデーターベース430上での識別名を決定する。また、生成モジュール250は、ユーザプログラム210ユーザプログラム210で利用され得るデータ型と、データーベース430で利用され得るデータ型との予め定められた対応関係213に基づいて、ユーザプログラム210に含まれる収集対象の各変数について、当該変数のデータ型に対応するデーターベース430上でのデータ型を特定する。次に、生成モジュール250は、収集対象の各変数について決定されたデーターベース430での識別名と、収集対象の各変数について特定されたデーターベース430でのデータ型とに基づいて、テーブル生成のためのSQL文を生成する。
 このように、ユーザは、データーベース430にテーブルを生成するにあたってSQL文230を記述する必要がない。そのため、SQLの知識がないユーザであってもデーターベース430を容易に構築することできる。
 <Q.付記>
 以上のように、本実施形態は以下のような開示を含む。
[構成1]
 制御対象を制御するためのコントローラ(200)であって、
 データーベース(430)にアクセスするための通信部(201)と、
 前記制御対象を制御するための制御プログラムを格納する記憶装置(208)とを備え、
 前記制御プログラムは、当該制御プログラムに含まれる収集対象の変数の格納先となるテーブル(432)を前記データーベース(430)上に生成するためのSQL文(230)を出力する生成モジュール(250)を含み、
 前記生成モジュール(250)は、
  前記収集対象の各変数について前記データーベース(430)上での識別名を決定し、
  前記制御プログラムで利用され得るデータ型と、前記データーベース(430)で利用され得るデータ型との予め定められた対応関係(213)に基づいて、前記収集対象の各変数について、当該変数のデータ型に対応する前記データーベース(430)上でのデータ型を特定し、
  前記収集対象の各変数について決定された前記識別名と、前記収集対象の各変数について特定された前記データ型とに基づいて、前記SQL文(230)を生成する、コントローラ。
[構成2]
 前記コントローラ(200)は、前記収集対象の各変数と、当該各変数のデータ型と、当該各変数についての前記データーベース(430)上での識別名と、当該各変数についての前記データーベース(430)上のデータ型との対応付け結果をさらに出力する、構成1に記載のコントローラ。
[構成3]
 前記生成モジュール(250)は、前記収集対象の各変数の変数名と同一の名前、または、前記収集対象の各変数の変数名を含む名前を、前記データーベース(430)上での前記識別名として決定する、構成1または2に記載のコントローラ。
[構成4]
 前記生成モジュール(250)は、
  前記収集対象の変数に構造体が含まれている場合、構造体名について前記識別名を決定するとともに、前記構造体の各メンバについて前記識別名を決定し、
  前記構造体名について決定された前記識別名を前記テーブル(432)に登録するように前記SQL文(230)を生成し、
  前記構造体の各メンバについて決定された前記識別名を前記テーブル(432)とは別のテーブル(432)に登録するように前記SQL文(230)を生成する、構成1~3のいずれか1項に記載のコントローラ。
[構成5]
 前記SQL文(230)は、前記構造体名について決定された前記識別名を外部キーとして前記テーブル(432)に登録するための命令文を含む、構成4に記載のコントローラ。
[構成6]
 前記生成モジュール(250)は、前記収集対象の変数の内のいずれかを主キーとして指定するための入力を受け付けるように規定されており、
 前記SQL文(230)は、指定された変数に対応する識別名を主キーにとして前記テーブル(432)に登録するための命令文を含む、構成1~5のいずれか1項に記載のコントローラ。
[構成7]
 データーベース(430)にアクセスすることが可能なコントローラ(200)の制御方法であって、
 前記コントローラ(200)の制御プログラムを受信するステップと、
 前記制御プログラムに含まれる収集対象の各変数について前記データーベース(430)上での識別名を決定するステップと、
 前記制御プログラムで利用され得るデータ型と、前記データーベース(430)で利用され得るデータ型との予め定められた対応関係(213)に基づいて、前記収集対象の各変数について、当該変数のデータ型に対応する前記データーベース(430)上でのデータ型を特定するステップと、
 前記収集対象の各変数について決定された前記識別名と、前記収集対象の各変数について特定された前記データ型とに基づいて、前記収集対象の変数の格納先となるテーブル(432)を前記データーベース(430)に生成するためのSQL文(230)を出力するステップとを含む、制御方法。
[構成8]
 データーベース(430)にアクセスすることが可能なコントローラ(200)の制御プログラムであって、
 前記制御プログラムは、前記コントローラ(200)に、
  前記制御プログラムに含まれる収集対象の各変数について前記データーベース(430)上での識別名を決定するステップと、
  前記制御プログラムで利用され得るデータ型と、前記データーベース(430)で利用され得るデータ型との予め定められた対応関係(213)に基づいて、前記収集対象の各変数について、当該変数のデータ型に対応する前記データーベース(430)上でのデータ型を特定するステップと、
  前記収集対象の各変数について決定された前記識別名と、前記収集対象の各変数について特定された前記データ型とに基づいて、前記収集対象の変数の格納先となるテーブル(432)を前記データーベース(430)に生成するためのSQL文(230)を出力するステップとを実行させる、制御プログラム。
 今回開示された実施の形態は全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味および範囲内での全ての変更が含まれることが意図される。
 10,10X 制御システム、30 開発ツール、31 プログラム設計画面、33 テーブル設定画面、35,36,41,45,46,50,51 設定欄、42 表示欄、35A,41A,42A,46A,50A,51A ボタン、58 テーブル生成ボタン、59 キャンセルボタン、100 開発支援装置、102,202,402 制御装置、104,206,404 主メモリ、110,208,410 記憶装置、110A 開発支援プログラム、111,201,412 通信インターフェイス、114,414 インターフェイス、115,415 操作部、120,420 表示インターフェイス、121,421 表示部、125,425 内部バス、200 コントローラ、204 チップセット、209 システムプログラム、210 ユーザプログラム、210A シーケンスプログラム、210B モーションプログラム、211 制御プログラム、212 設定情報、213 対応関係、214,232,232A,232B マッピングテーブル、222 内部バスコントローラ、224 フィールドバスコントローラ、226 I/Oユニット、229 収集対象変数、230,230A,230B SQL文、239 メモリカードインターフェイス、240 メモリカード、248 マッピングモジュール、249 マッピングFB、250,250A 生成モジュール、251,251A テーブル生成FB、252 プログラム実行モジュール、255A,255B,255C,255D,255D2,255E,258A,258B 入力部、256A,256B,256C,256D,256E,256F,259A,259B,259C,259D,259E 出力部、300 駆動機器、300A ロボットコントローラ、300B サーボドライバ、301A アームロボット、301B サーボモータ、400 外部機器、416 フィールドバスインターフェイス、430 データーベース、432,432A,432B テーブル。

Claims (8)

  1.  データーベースにアクセスすることが可能なコントローラと、
     前記コントローラと通信可能に構成されている開発支援装置とを備え、
     前記開発支援装置には、前記コントローラの制御プログラムの開発を支援するための開発ツールがインストールされ得、
     前記開発ツールは、前記制御プログラムに含まれる変数の内から収集対象の変数を指定するための設定と、当該収集対象の各変数について前記データーベース上での識別名を指定するための設定とを設定情報として受け付けるように構成されており、
     前記コントローラまたは前記開発ツールは、前記設定情報に規定される前記データーベース上での識別名と、当該識別名に対応する前記データーベース上でのデータ型とに基づいて、前記収集対象の変数の格納先となるテーブルを前記データーベース上に生成するためのSQL文を出力するための生成モジュールを含む、制御システム。
  2.  前記開発ツールは、前記収集対象の各変数が設定されたことに基づいて、当該変数のデータ型を表示するように構成されている、請求項1に記載の制御システム。
  3.  前記開発ツールは、前記収集対象として指定された変数の内から主キーを指定するための設定をさらに受け付けるように構成されている、請求項1または2に記載の制御システム。
  4.  前記開発ツールは、前記収集対象として指定された変数に構造体が含まれている場合、当該構造体に含まれる各メンバについて、前記データーベース上での識別名の指定を受け付けるように構成されている、請求項1~3のいずれか1項に記載の制御システム。
  5.  前記生成モジュールは、前記構造体の各メンバについて決定された前記識別名を前記テーブルとは別のテーブルに登録するように前記SQL文を生成する、請求項4に記載の制御システム。
  6.  前記生成モジュールは、前記構造体の識別名を外部キーとして前記テーブルに登録するための命令コードを前記SQL文に含める、請求項5に記載の制御システム。
  7.  制御プログラムの開発を支援するための開発支援装置と通信可能に構成されており、データーベースにアクセスすることが可能なコントローラであって、
     前記開発支援装置には、前記制御プログラムの開発を支援するための開発ツールがインストールされ得、
     前記開発ツールは、前記制御プログラムに含まれる変数の内から収集対象の変数を指定するための設定と、当該収集対象の各変数について前記データーベース上での識別名を指定するための設定とを設定情報として受け付けるように構成されており、
     前記コントローラは、
      前記設定情報および前記制御プログラムを前記開発支援装置から受信するための通信部と、
      前記開発支援装置から受信した前記制御プログラムに従って制御対象の駆動機器を制御するためのプログラム実行モジュールと、
      前記開発支援装置から受信した前記設定情報に規定される前記データーベース上での識別名と、当該識別名に対応する前記データーベース上でのデータ型とに基づいて、前記収集対象の変数の格納先となるテーブルを前記データーベース上に生成するためのSQL文を出力するための生成モジュールとを備える、コントローラ。
  8.  制御プログラムの開発を支援するための開発支援装置と通信可能に構成されており、データーベースにアクセスすることが可能なコントローラの制御方法であって、
     前記開発支援装置には、前記制御プログラムの開発を支援するための開発ツールがインストールされ得、
     前記開発ツールは、前記制御プログラムに含まれる変数の内から収集対象の変数を指定するための設定と、当該収集対象の各変数について前記データーベース上での識別名を指定するための設定とを設定情報として受け付けるように構成されており、
     前記制御方法は、
      前記設定情報および前記制御プログラムを前記開発支援装置から受信するステップと、
      前記開発支援装置から受信した前記制御プログラムに従って制御対象の駆動機器を制御するステップと、
      前記開発支援装置から受信した前記設定情報に規定される前記データーベース上での識別名と、当該識別名に対応する前記データーベース上でのデータ型とに基づいて、前記収集対象の変数の格納先となるテーブルを前記データーベース上に生成するためのSQL文を出力するステップとを備える、制御方法。
PCT/JP2019/006292 2018-03-15 2019-02-20 制御システム、コントローラ、および制御方法 WO2019176486A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US16/643,546 US11281650B2 (en) 2018-03-15 2019-02-20 Control system, controller, and control method
EP19766954.2A EP3767458A4 (en) 2018-03-15 2019-02-20 CONTROL SYSTEM, CONTROL ORGAN AND CONTROL METHOD
CN201980004158.7A CN111095194B (zh) 2018-03-15 2019-02-20 控制系统、控制器以及控制方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-047633 2018-03-15
JP2018047633A JP6720994B2 (ja) 2018-03-15 2018-03-15 制御システム、コントローラ、および制御方法

Publications (1)

Publication Number Publication Date
WO2019176486A1 true WO2019176486A1 (ja) 2019-09-19

Family

ID=67907677

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/006292 WO2019176486A1 (ja) 2018-03-15 2019-02-20 制御システム、コントローラ、および制御方法

Country Status (5)

Country Link
US (1) US11281650B2 (ja)
EP (1) EP3767458A4 (ja)
JP (1) JP6720994B2 (ja)
CN (1) CN111095194B (ja)
WO (1) WO2019176486A1 (ja)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7044086B2 (ja) * 2019-03-15 2022-03-30 オムロン株式会社 制御システム、制御方法、および制御プログラム
CN112015831A (zh) * 2020-09-09 2020-12-01 深圳市绿联科技有限公司 基于c语言对关系型数据库进行操作的方法、装置及设备
US11436211B1 (en) * 2020-09-29 2022-09-06 Amazon Technologies, Inc. Renaming a database table with minimized application downtime

Citations (5)

* 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 インターフェース装置
WO2013191275A1 (ja) * 2012-06-22 2013-12-27 オムロン株式会社 制御装置
WO2014184962A1 (ja) 2013-05-17 2014-11-20 三菱電機株式会社 プログラマブルコントローラとその周辺装置、およびプログラマブルコントローラのテーブルデータアクセスプログラム
WO2015162794A1 (ja) * 2014-04-25 2015-10-29 三菱電機株式会社 情報連携支援装置、情報連携支援プログラム
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
US5619688A (en) * 1993-09-02 1997-04-08 Microsoft Corporation Method and system for constructing database queries using a field selection grid
US5732262A (en) * 1994-01-31 1998-03-24 International Business Machines Corporation Database definition language generator
US5826257A (en) * 1996-03-20 1998-10-20 Microsoft Corporation Method and structure for maintaining and utilizing a lookup value associated with a stored database value
US7792853B2 (en) * 2006-11-08 2010-09-07 Ragothaman Subbian Presenting data flow in legacy program
US20090055429A1 (en) * 2007-08-23 2009-02-26 Lockheed Martin Corporation Method and system for data collection
US8819068B1 (en) * 2011-09-07 2014-08-26 Amazon Technologies, Inc. Automating creation or modification of database objects
US10353794B2 (en) * 2016-05-09 2019-07-16 Sap Se Parameter-based deployment control for deployment of database artifacts

Patent Citations (5)

* 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 インターフェース装置
WO2013191275A1 (ja) * 2012-06-22 2013-12-27 オムロン株式会社 制御装置
WO2014184962A1 (ja) 2013-05-17 2014-11-20 三菱電機株式会社 プログラマブルコントローラとその周辺装置、およびプログラマブルコントローラのテーブルデータアクセスプログラム
WO2015162794A1 (ja) * 2014-04-25 2015-10-29 三菱電機株式会社 情報連携支援装置、情報連携支援プログラム
JP2016194808A (ja) 2015-03-31 2016-11-17 オムロン株式会社 プログラマブルロジックコントローラ、データ収集装置、データベースアクセス方法およびデータベースアクセスプログラム

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
US11281650B2 (en) 2022-03-22
EP3767458A1 (en) 2021-01-20
JP6720994B2 (ja) 2020-07-08
JP2019159995A (ja) 2019-09-19
CN111095194A (zh) 2020-05-01
EP3767458A4 (en) 2022-02-09
CN111095194B (zh) 2023-11-17
US20200201835A1 (en) 2020-06-25

Similar Documents

Publication Publication Date Title
WO2019176487A1 (ja) コントローラ、制御方法、および制御プログラム
CN101460928B (zh) 简化安装替代性现场设备的方法和支持性配置用户界面
WO2019176486A1 (ja) 制御システム、コントローラ、および制御方法
JP2018534685A (ja) 切断されたプロセス制御ループの一部分をコミッショニングするためのデバイスシステムタグの判定
US10620615B2 (en) Engineering tool coordination device, engineering tool coordination method, and non-transitory computer readable storage medium
WO2019167512A1 (ja) 表示装置、画面生成方法、および画面生成プログラム
WO2019176336A1 (ja) 制御システム、開発支援装置、および開発支援プログラム
JP7024679B2 (ja) 開発支援プログラム、開発支援装置、および開発支援方法
JP4666172B2 (ja) 制御システム設定管理システム
JP6984499B2 (ja) FA(Factory Automation)システム、コントローラ、および制御方法
JP7044086B2 (ja) 制御システム、制御方法、および制御プログラム
WO2020184061A1 (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: 19766954

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: 2019766954

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2019766954

Country of ref document: EP

Effective date: 20201015