Error Detection Device for PLC Logic
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In PLC automation systems using the IEC61131-3 programming language, users face challenges in efficiently detecting and managing identical or similar logics, leading to potential errors and reliability issues during logic changes due to the lack of standardized templates and effective error detection mechanisms.
Innovation Solution
An error detection device and method that converts prepared programs into sequences, calculates hash codes, and applies the Longest Common Subsequence (LCS) algorithm to identify and report identical or similar logics, with optional features for variable filtering and user-set similarity thresholds to enhance detection accuracy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If manual searching and changing of same or similar logics is performed, then logic changes can be made, but time consumption and error risk increase significantly
Solution Approach 1:
The system performs preliminary detection of same or similar logics during the program preparation phase, before actual logic changes are needed. By pre-identifying and marking duplicate logics, the system eliminates the need for manual searching during subsequent maintenance or modification operations, thus resolving the time loss contradiction.
Solution Approach 2:
The detection device provides feedback information about same or similar logics to the user, enabling informed decision-making during logic changes. This feedback mechanism allows users to efficiently manage duplicate logics without manual searching, improving productivity while reducing time consumption.
2Reliability
If manual detection of same or similar logics is performed, then logic management is possible, but detection accuracy and reliability decrease
Solution Approach 1:
The system replaces manual mechanical detection methods with automated computational algorithms. The detection device automatically compares program sequences using hashing and LCS algorithms, substituting human effort with machine-based detection that provides higher accuracy and reliability while reducing the difficulty of detecting same or similar logics.
Solution Approach 2:
The system creates hash code copies of program sequences for efficient comparison. By generating and comparing hash codes, the system enables rapid and accurate detection of same or similar logics, significantly improving detection reliability while reducing the complexity of the detection process.
3Reliability
If comprehensive logic detection is performed, then error prevention improves, but system complexity increases
Solution Approach 1:
The detection system is divided into distinct functional modules: sequence generation unit, hash code calculation unit, LCS calculation unit, and detection unit. This segmentation allows each component to perform a specific function, making the overall complex detection system manageable and maintainable while providing comprehensive error detection capability.
Solution Approach 2:
Hash codes serve as intermediaries between the original program sequences and the comparison process. By converting sequences into hash codes for comparison, the system simplifies the detection mechanism while maintaining comprehensive detection capability, thus improving reliability without proportionally increasing system complexity.
Data Source
AI summary
An error detection device and method for a programming language is provided, the device including a program preparation unit configured to prepare a program by using a programming language, a logic converter configured to convert the prepared program to a sequence, a hash code calculator configured to detect a same logic relative to a sequence by dividing the converted sequence to a minimum unit of a plurality of program languages, calculating each hash code by the divided minimum unit of the plurality of program languages and comparing each calculated hash code, and an LCS (Longest Common Subsequence) calculator calculating an LCS relative to the sequence divided by the minimum unit of the plurality of program languages, and detecting a similar logic relative to the sequence by applying the calculated LCS to an LCS algorithm.


