PLC Data Logging with Nonblocking Queue Buffering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Programmable logic controllers (PLCs) face challenges in rapidly storing I/O data due to the lower writing speed of large-capacity storage compared to main memory, necessitating a mechanism to efficiently enter rapidly generated data into storage.
Innovation Solution
A controller with a time-series database and a nonblocking queue in volatile main memory, where data is temporarily stored in the queue before being written to the database, allowing independent data collection and storage processes, and enabling resizing of shared buffers to prevent overflow.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If data is directly written from main memory to large-capacity storage, then storage capacity is increased, but writing speed decreases
Solution Approach 1:
The patent segments the storage system into two distinct parts: a high-speed main memory (RAM) and a large-capacity storage device. The main memory serves as a buffer for rapid data ingestion, while the large-capacity storage provides extensive storage capacity. This segmentation allows each component to operate at its optimal speed without compromising the other.
Solution Approach 2:
The patent introduces a nonblocking queue as an intermediary data structure between the data generator and the time-series database. This queue acts as a buffer that decouples the fast data generation process from the slower storage process, allowing data to be written to the queue at high speed while being gradually transferred to the large-capacity storage.
2Reliability
If a nonblocking queue is used to buffer data, then data storage reliability is improved, but memory usage increases
Solution Approach 1:
The patent implements a dynamic buffer management system where the nonblocking queue's memory allocation can be adjusted based on system conditions. The buffer size is not fixed but can be dynamically resized to balance between reliability (preventing data loss) and memory usage constraints.
Solution Approach 2:
The patent changes the parameter of buffer size from a static value to a dynamically adjustable parameter. This allows the system to adapt the memory usage of the nonblocking queue based on available resources and data flow characteristics, optimizing both reliability and memory efficiency.
3Reliability
If shared buffers are resized to prevent overflow, then data loss is prevented, but system complexity increases
Solution Approach 1:
The patent implements a feedback mechanism that monitors the fill level of the nonblocking queue and triggers buffer resizing operations when thresholds are reached. This automatic feedback-based management prevents data overflow while reducing the complexity of manual buffer management, as the system self-regulates based on real-time conditions.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A structure allows records including rapidly generated data to enter a large-capacity storage. A controller controls a control target. The controller includes a time-series database that stores a record including data about the control target in chronological order, a data generator that generates data to be included in the record to enter the time-series database in every predetermined cycle, and a nonblocking queue included in a volatile main memory that sequentially stores the data generated by the data generator.