PLC Database Access Recovery via Nonvolatile Status Tracking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing programmable logic controllers (PLCs) face reliability issues due to power interruptions, which can result in data loss and interrupted database access, as they may fail to save data in external storage during power recovery, leading to instability in database system interactions.
Innovation Solution
A PLC with a nonvolatile memory and an access processing unit that stores instruction sentences until completion, includes status information to track SQL sentence sending status, and a recovery program to resume database access based on this status, ensuring data integrity and reliability even during power interruptions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the controller saves spool information in external storage regularly, then data accumulation capability is improved, but data loss may occur during power interruption while saving
Solution Approach 1:
The controller performs preliminary actions by saving spool information to nonvolatile memory before power interruption can occur. This ensures that even if power is interrupted during external storage operations, the data is already protected in a safe location and can be recovered without loss.
Solution Approach 2:
The controller prepares compensatory measures in advance by maintaining spool information in nonvolatile memory as a backup buffer. This cushioning mechanism ensures that if power interruption damages data during external storage saving, the original data can be recovered from the nonvolatile memory without loss.
2Reliability
If the controller holds spool information in nonvolatile memory, then recovery capability is improved, but data loss may still occur during external storage operations
Solution Approach 1:
The controller implements a feedback mechanism by monitoring the completion status of save operations and using status information to determine whether to re-send SQL sentences. This feedback loop ensures that data is only considered successfully transferred when confirmation is received, preventing information loss.
Solution Approach 2:
The controller performs self-service by automatically managing its own recovery process using stored status information. When power is restored, the controller independently determines what data needs to be re-sent based on saved status information, without requiring external intervention or manual recovery procedures.
3Reliability
If the controller re-sends SQL sentences after power recovery, then data completeness is improved, but system complexity increases due to status tracking
Solution Approach 1:
The controller extracts only the essential status information needed for recovery (whether SQL sentences were sent and whether save operations completed) from the complex database access process. This selective extraction simplifies the recovery mechanism by focusing only on critical status data rather than tracking all possible operation states.
4Reliability
If the controller tracks SQL sentence sending status, then recovery accuracy is improved, but processing time increases during normal operation
Solution Approach 1:
The controller applies partial action by tracking only the specific status information necessary for recovery (sending status and save completion status) rather than monitoring all database operations. This selective tracking provides sufficient recovery accuracy while minimizing processing time overhead during normal operation.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present invention provides a technique for improving the reliability of access to a database system in a controller, such as a PLC (30, 40). A PLC (30, 40) accessible to a database accesses a DB server (20) in response to an event in which a user program (32) calls a DB access processing program (35). The DB access processing program (35) stores status information indicating a status of accesses to the DB server (20) in a nonvolatile memory (66), in accordance with an instruction of the user program (32). When a power interruption occurs, the PLC (30, 40) can obtain a status of accesses to the DB server (20) at the timing of the occurrence of the power interruption by referring to the status information. Then, the PLC (30, 40), for example, re-sends a SQL sentence, depending on the access status.