PLC Program Conversion from Function Blocks to Object-Oriented Code
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The transition to object-oriented programming for programmable controllers increases the burden on users due to the need to learn new language specifications and perform complex program corrections, leading to potential errors and unintended operations.
Innovation Solution
A programming support program that converts non-object-oriented source code into object-oriented source code by replacing function blocks and instance descriptions, using a programming support apparatus to generate operational programs for programmable controllers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If conventional function blocks are used in operational programs, then the programming syntax is simple and easy to understand, but the program cannot utilize object-oriented programming features and requires manual conversion burden
Solution Approach 1:
A conversion program acts as an intermediary tool between conventional function block programs and object-oriented function block programs. This automated conversion process eliminates the need for users to manually learn and apply complex object-oriented programming syntax, while still enabling the operational program to utilize object-oriented features. The conversion program mediates the transition by automatically transforming conventional function block definitions into object-oriented function block definitions with proper class structures, methods, and inheritance relationships.
2Adaptability or versatility
If object-oriented programming is adopted for operational programs, then the program functionality and reusability are enhanced, but the user burden increases due to learning new language specifications and performing complex program corrections
Solution Approach 1:
The conversion program performs preliminary actions by automatically transforming conventional function block definitions into object-oriented function block definitions before the operational program is executed. This preliminary conversion process handles all the complex syntax transformations, class structure creations, and method definitions in advance, so that users only need to write simple conventional function block programs without worrying about object-oriented programming complexity. The heavy lifting of object-oriented transformation is done automatically in the conversion stage.
Solution Approach 2:
The conversion program enables self-service by allowing users to automatically convert their conventional function block programs into object-oriented programs without requiring them to manually learn object-oriented programming syntax or perform complex corrections. The system serves itself by having the conversion program handle all the intricate transformations, syntax adjustments, and structure reorganizations automatically, freeing users from the burden of direct object-oriented programming while still enabling them to benefit from object-oriented features.
3Reliability
If manual conversion to object-oriented programming is performed, then the program can be updated according to language specifications, but errors may occur leading to unintended operations
Solution Approach 1:
The conversion program serves as a reliable intermediary that systematically transforms conventional function block definitions into object-oriented function block definitions according to the specified conversion rules. This automated mediation process ensures consistency and correctness by applying uniform transformation logic across all function blocks, eliminating manual errors. The conversion program mediates between the simple conventional syntax and the complex object-oriented syntax, ensuring proper translation of function block definitions, method signatures, and inheritance relationships without introducing errors.
Data Source
AI summary
A program causes a programming support apparatus that provides support for generation of an operational program for operating a programmable controller to function as an acquirer for acquiring a first source code of the operational program, and a generator. The generator generates a second source code of the operational program by replacing a conventional FB that is described in the first source code and describes a function of a function block corresponding to a subroutine in a form different from one or more methods contained in the function block, with an object-oriented FB describing the function as one or more methods, or replacing a description relating to an instance declared on the basis of the conventional FB in the first source code, with a description relating to an instance declared on the basis of the object-oriented FB.


