Controller SQL Error Logging for Factory Database Debugging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In Factory Automation systems, users face difficulties in determining the cause of errors when data is not properly added to a database, as the errors can be caused by various factors and are challenging to diagnose.
Innovation Solution
An information processing device is configured to communicate with a controller, storing SQL statements and their execution results as log data. It displays and allows correction of unsuccessful SQL statements, compares them with successful ones, and sends execution instructions to the controller, facilitating error diagnosis and correction.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If SQL statements are executed to insert data into a database, then data related to the control target can be stored, but errors may occur making it difficult to determine the cause
Solution Approach 1:
The system performs preliminary actions by storing execution logs of SQL statements before errors occur. These logs contain the actual SQL statements that were executed, allowing users to review and diagnose errors after they happen. The log storage prepares the necessary information in advance, making error detection easier without preventing the error itself.
Solution Approach 2:
The system implements feedback by storing and displaying execution results of SQL statements in logs. When an error occurs, the user can retrieve the log information to see what SQL statement was executed and its result, providing feedback about the error condition. This allows users to identify problematic statements and correct them.
2Reliability
If users manually determine and correct SQL statement errors, then data can be properly added to the database, but the process becomes time-consuming and complex
Solution Approach 1:
The system performs preliminary actions by storing execution logs of SQL statements before errors occur. These logs contain the actual SQL statements that were executed, allowing users to review and diagnose errors after they happen. The log storage prepares the necessary information in advance, making error detection easier without preventing the error itself.
Solution Approach 2:
The system implements feedback by storing and displaying execution results of SQL statements in logs. When an error occurs, the user can retrieve the log information to see what SQL statement was executed and its result, providing feedback about the error condition. This allows users to identify problematic statements and correct them.
Data Source
AI summary
A controller that controls a control target includes one or more processors, a memory that stores a program to be executed by the processors, a communication interface that accesses a database, and a storage device. The one or more processors is programed to generate an SQL statement in accordance with a function block defined in a user program based on configuration information that defines a correspondence relationship between a data type of the user program and a data type of the database, send the generated SQL statement to the database when the execution result of the SQL statement indicates an error, associate the SQL statement with an execution result of the SQL statement sent to the database and store the same as an error log in the storage device, and send the error log to an information processing device in response to a request.


