IP Library Granted Patent US 10,061,809
Granted Patent B2
US 10,061,809 · App. 14/405,980 · Granted Aug 28, 2018

Control device

Inventors: Kotaro Okamura (Kyoto, JP); Yoshihide Nishiyama (Kyoto, JP); Minoru Oka (Kyoto, JP); Masanori Ota (Kyoto, JP); Masaru Nakasaki (Kyoto, JP)
Assignee: OMRON CORPORATION
G06F17/30507G05B19/056G06F17/30595G05B19/4186G05B2219/31369Y02P90/12Y02P90/185
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,061,809
App. No.
14/405,980
Granted
Aug 28, 2018
Kind
B2
Abstract

Provided is a technique enables programming, including that for database operations, without describing a SQL used to operate the database. A PLC ( 30 ) that can access a DBMS ( 22 ) stores a user program ( 38 ) and definition information ( 32 ), the user program ( 38 ) including a structure type of variable, the definition information ( 32 ) indicating a definition of the structure type. The sequence command program ( 34 ) sequentially executes instructions in the user program ( 38 ) and invokes a DB access process program ( 35 ) in order to access the DBMS ( 22 ). The DB access process program ( 35 ) reads the definition information ( 32 ) and, on the basis of the read definition information ( 32 ), generates a SQL statement to be used when access to the DBMS ( 22 ) is made by execution of the user program ( 38 ). The DB access process program ( 35 ) executes the generated SQL statement by transmitting the SQL statement to the DB server ( 20 ).

Claims (45)

1. A programmable logic controller (PLC) for accessing a database system, the PLC comprising:

a connection configured to connect the PLC with a personal computer for receiving a user program and definition information from the personal computer, wherein the definition information is in a non-SQL language;

an interface configured to read values from an external sensor;

a microprocessor configured to perform operations based on stored instructions;

a memory configured to store the user program and the definition information, the user program including a variable of a structure type, the definition information indicating a definition of the structure type included in the user program;

a converter configured to convert the definition information in the non-SQL language to a SQL statement for controlling the PLC to access the database system; and

an executioner configured to execute the SQL statement that is generated by transmitting the SQL statement to the database system.

2. The PLC according to claim 1 ,

wherein the converter converts the definition information in the non-SQL language to the SQL statement by extracting a structure tag name and a member name indicated by a definition in the definition information which corresponds to the user program that is executed and designating the structure tag name and the member name that are executed as a table name and a field name used to access the database system in accordance with a preset conversion rule.

3. PLC according to claim 1 ,

wherein the converter converts the definition information in the non-SQL language to the SQL statement including no value, from which a table name and a field name used to access the database system are identified, based on the definition information, and

the executioner executes the SQL statement by transmitting the SQL statement including no value to the database system in advance, extracting a value of a member in the variable of a structure type in accordance with an instruction in the user program, and transmitting the value that is extracted to the database system.

4. The PLC according to claim 1 ,

wherein the memory stores mapping information that provides a conversion rule for converting a definition of a structure tag name and a member name indicated by the definition information into a table name and a field name used to access the database system, and

the converter converts the definition information in the non-SQL language to the SQL statement based on the structure tag name and the member name indicated by the definition information and the conversion rule provided by the mapping information.

5. The PLC according to claim 4 ,

wherein the converter converts the definition information in the non-SQL language to the SQL statement including no value based on a table name and a field name indicated by the mapping information, and

the executioner executes the SQL statement by transmitting the SQL statement including no value to the database system in advance, extracting a value of a member in the variable of a structure type in accordance with an instruction in the user program, and transmitting the extracted value to the database system.

6. The PLC according to claim 1 ,

wherein the memory is configured to store mapping information that provides a conversion rule for converting a definition of a structure tag name and a member name indicated by the definition information into a table name and a field name used to access the database system,

the user program includes an instruction for generating the mapping information based on the definition information, and

the converter converts the definition information in the non-SQL language to the mapping information based on the definition information by executing the instruction for generating the mapping information which is included in the user program, and

converts the definition information in the non-SQL language to the SQL statement based on the structure tag name and the member name indicated by the definition information and the conversion rule provided by the generated mapping information.

7. A programmable logic controller (PLC) for accessing a database system, the PLC comprising:

a connection configured to connect the PLC with a personal computer for receiving a user program and definition information from the personal computer, wherein the definition information is in a non-SQL language;

an interface configured to read values from an external sensor;

a microprocessor;

a memory configured to store the user program and the definition information, the user program including variable of a structure type, the definition information indicating a definition of the structure type included in the user program, the memory including instructions that when executed by the microprocessor, cause the microprocessor to perform operations including

converting the definition information in the non-SQL language to a SQL statement for controlling the PLC to access the database system; and

executing the converted SQL statement by transmitting the SQL statement to the database system.

8. The PLC according to claim 7 ,

wherein the converting converts the definition information in the non-SQL language to the SQL statement by extracting a structure tag name and a member name indicated by a definition in the definition information which corresponds to the executed user program and designating the extracted structure tag name and member name as a table name and a field name used to access the database system in accordance with a preset conversion rule.

9. The PLC according to claim 7 ,

wherein the converting converts the definition information in the non-SQL language to the SQL statement including no value, from which a table name and a field name used to access the database system are identified, based on the definition information, and

the executing executes the SQL statement by transmitting the SQL statement including no value to the database system in advance, extracting a value of a member in the variable of a structure type in accordance with an instruction in the user program, and transmitting the extracted value to the database system.

10. The PLC according to claim 7 ,

wherein the memory stores mapping information that provides a conversion rule for converting a definition of a structure tag name and a member name indicated by the definition information into a table name and a field name used to access the database system, and

the converting converts the definition information in the non-SQL language to the SQL statement based on the structure tag name and the member name indicated by the definition information and the conversion rule provided by the mapping information.

11. The PLC according to claim 10 ,

wherein the converter converts the definition information in the non-SQL language to the SQL statement including no value based on a table name and a field name indicated by the mapping information, and

the executing executes the SQL statement by transmitting the SQL statement including no value to the database system in advance, extracting a value of a member in the variable of a structure type in accordance with an instruction in the user program, and transmitting the extracted value to the database system.

12. The PLC according to claim 7 ,

wherein the memory is configured to store mapping information that provides a conversion rule for converting a definition of a structure tag name and a member name indicated by the definition information into a table name and a field name used to access the database system,

the user program includes an instruction for generating the mapping information based on the definition information, and

the converting converts the definition information in the non-SQL language to the mapping information based on the definition information by executing the instruction for generating the mapping information which is included in the user program, and converts the definition information in the non-SQL language to the SQL statement based on the structure tag name and the member name indicated by the definition information and the conversion rule provided by the generated mapping information.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 15, 2015
From: OKAMURA, KOTARO; NISHIYAMA, YOSHIHIDE; OKA, MINORU; OTA, MASANORI; NAKASAKI, MASARU
To: OMRON CORPORATION
Reel/Frame 035650/0170 →
Priority Claims (1)
JP 2012-141378 · Jun 22, 2012 · national
Continuity (1)
Related Publication 20150254305A1 · Sep 10, 2015