Search

CN-116450589-B - Control system, information processing apparatus, and recording medium

CN116450589BCN 116450589 BCN116450589 BCN 116450589BCN-116450589-B

Abstract

Control system, information processing apparatus, and recording medium. The control system has a database which holds 1 or more tables, and a control device which executes a control program and can access the database, and the control system acquires the number of columns constituting a selected table among the 1 or more tables and the data type of each column. The control system defines a structure that includes a number of members corresponding to the number of acquired columns and can be used in a control program. The control system determines the data type of each member of the structure in accordance with the acquired data type of each column.

Inventors

  • QIAN ZHICHENG
  • OKAMURA KOTARO

Assignees

  • 欧姆龙株式会社

Dates

Publication Date
20260505
Application Date
20200214
Priority Date
20190308

Claims (8)

  1. 1. A control system for automating a production process and controlling a control object, the control system having: a database holding 1 or more tables; A control device capable of accessing the database, and An information processing device for assisting development of a user program executed by the control device, The user program comprises any one of a ladder diagram, a command list, structured text, and a sequential function chart, or a combination thereof, The information processing device includes: an acquisition unit that acquires a column name and a data type of each column constituting a selected table of the 1 or more tables; A determining unit configured to determine a data type of each member usable in the user program in accordance with the acquired data type of each column; a1 st display unit that displays a screen including a column name and a data type of each column, and a data type of each member corresponding to the data type of each column; A2 nd display unit for displaying items among the plurality of generated items and a screen for accepting selection of the items based on the user operation, and And a generation unit that generates a generated item corresponding to the selected item as a part of the user program, based on the determined data type of each member and a process value obtained by performing an operation based on the field value of the production field.
  2. 2. The control system of claim 1, wherein, The decision unit decides a data type of each member from among data types available in the user program.
  3. 3. The control system of claim 1, wherein, The decision unit decides the data type of each member based on a list indicating the correspondence between the data type of the column and the data type of the member.
  4. 4. The control system according to any one of claim 1 to 3, wherein, The decision unit decides the data type of each member according to the user operation.
  5. 5. The control system according to any one of claim 1 to 3, wherein, The user program comprising a1 st functional block, the 1 st functional block for executing a command controlling access to the database, In the 1 st function block, a variable corresponding to the object field is set as an argument.
  6. 6. The control system according to any one of claim 1 to 3, wherein, The user program includes a 2 nd function block for enabling saving of data of a data type corresponding to the data type of each column to the control device.
  7. 7. An information processing apparatus that automates a production process and assists development of a user program executed by a control apparatus, the user program including any one of a ladder diagram, a command list, a structured text, and a sequential function diagram, or a combination thereof, the information processing apparatus having: an acquisition unit that acquires a column name and a data type of each column of a table selected from among 1 or more tables held in a database accessible to the control device; A determining unit configured to determine a data type of each member usable in the user program in accordance with the acquired data type of each column; a1 st display unit that displays a screen including a column name and a data type of each column, and a data type of each member corresponding to the data type of each column; A2 nd display unit for displaying items among the plurality of generated items and a screen for accepting selection of the items based on the user operation, and And a generation unit that generates a generated item corresponding to the selected item as a part of the user program, based on the determined data type of each member and a process value obtained by performing an operation based on the field value of the production field.
  8. 8. A recording medium storing an information processing program executed by an information processing apparatus that automates a production process and assists development of a user program executed by a control apparatus, the user program including any one of a ladder diagram, a command list, a structured text, and a sequential function diagram, or a combination thereof, the information processing program causing the information processing apparatus to execute the steps of: acquiring a column name and a data type of each column of a selected table among 1 or more tables held in a database accessible to the control device; determining a data type of each member usable in the user program in correspondence with the acquired data type of each column; Displaying a screen including a column name and a data type of each column, and a data type of each member corresponding to the data type of each column; Displaying an item of the plurality of generated items and a screen for accepting selection of the item based on the user operation, and A generated item corresponding to the selected item is generated as part of the user program based on the determined data type of each member and a process value obtained by performing an operation based on the field value of the production field.

Description

Control system, information processing apparatus, and recording medium The present application is a divisional application of an application patent application with a filing date of 2020, a filing number of 202080017521.1, and a title of "control system, information processing apparatus, and information processing program". Technical Field The present disclosure relates to techniques for accessing tables on a database. Background In various production sites, FA (Factory Automation: factory automation) systems for automating production processes are becoming popular. The FA system is composed of various industrial driving devices. The driving device for industrial use includes, for example, a moving stage for moving a workpiece, a conveyor for conveying the workpiece, an arm robot for moving the workpiece to a predetermined target place, and the like. These driving devices are controlled by industrial control devices such as a PLC (Programmable Logic Controller: programmable logic controller) and a robot controller. In recent years, control devices and information processing devices that can access databases of external devices have been in widespread use. Japanese patent application laid-open publication 2016-194808 (patent document 1) discloses a control device capable of operating a plurality of records at once with a simple mechanism in the technique of operating a database without performing the description of SQL. Prior art literature Patent literature Patent document 1 Japanese patent application laid-open No. 2016-194808 Disclosure of Invention Problems to be solved by the invention In addition, when any one of the control device and the information processing device writes data registered by a structure that can be used in the control program into a table of the database, it is necessary to associate a column (column) in the table with a member (member) in the structure. When the user performs such correspondence alone using any one of the control device and the information processing device, a lot of time is required until the correspondence is completed. Therefore, a technique is needed that can easily perform correspondence between the columns in the table and the members in the structure. The present disclosure has been made in view of the above-described actual situation, and discloses a technique capable of easily performing correspondence between a column in a table and a member in a structure. Means for solving the problems In one example of the present disclosure, a control system for controlling a control object includes a database in which 1 or more tables are held, a control device that executes a control program and is capable of accessing the database, an acquisition unit that acquires the number of columns constituting a selected table of the 1 or more tables and the data type of each column, a setting unit that defines a structure that includes a number of members corresponding to the number of columns acquired and is usable in the control program, and a determination unit that determines the data type of each member of the structure in correspondence with the data type of each column acquired. According to the present disclosure, the control system performs the correspondence of the column and the member in advance, and thus can easily perform processing including adding the record of the structure in which the data is registered in the table. In one example of the present disclosure, the determining unit determines a data type of each member of the structure from among data types available in the control program. According to the present disclosure, the control system can easily correspond to the data type of a member in the appropriate structure to the data type of the column in the table. In one example of the present disclosure, the determining unit determines the data type of each member of the structure according to a user selection of 1 or more candidates of the data type. According to the present disclosure, the control system can provide the user with a data type of a member that can be associated with the data type of the column. In one example of the present disclosure, the determination means corresponds to the table name of the selected table as attribute information of a variable for referencing the entire structure. According to the present disclosure, the control system can provide the user with information indicating to which table the structure in the user program corresponds. In one example of the present disclosure, the determining unit associates a member name of each member of the structure with a column name of each column. According to the present disclosure, the control system can provide information to the user that can identify the member corresponding to the column. In one example of the present disclosure, the control program includes a function block for executing a command for controlling access to the database, and in the function block, a table name