PLC Unit Program Calls With Interface-Change Compatibility
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing support devices for PLCs face challenges in ensuring compatibility of callable unit programs, requiring users to create new POUs when interface changes occur, leading to complex library management and inefficient use of similar POUs with different interfaces.
Innovation Solution
A support device with a call detector and code generator that scans user programs to detect call expressions, generates creation, call, and setting instruction codes, allowing unit programs to be executed with set arguments even when the interface changes, ensuring compatibility without registering new POUs in the library.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the interface of a unit program is changed to improve functionality, then the program can utilize new features, but compatibility with existing user programs is lost requiring new POU registrations
Solution Approach 1:
The patent introduces an argument value setting unit that acts as an intermediary between the unit program interface and the caller. This unit automatically sets appropriate argument values based on the interface type, allowing the same unit program to be called with different arguments without changing the program itself. This resolves the contradiction by maintaining interface stability while enabling functional flexibility through automatic argument adaptation.
Solution Approach 2:
The patent changes the parameters (argument values) dynamically based on the interface type rather than changing the interface structure itself. By maintaining a consistent interface definition and varying only the argument values passed during execution, the system achieves both compatibility (same interface) and adaptability (different argument values for different functionalities).
2Reliability
If new POUs are registered in the library to maintain compatibility when interfaces change, then compatibility is ensured, but library management complexity increases
Solution Approach 1:
The patent makes a single unit program universal by enabling it to function with multiple interface variations through automatic argument value setting. Instead of creating separate POUs for each interface variation, one POU can handle multiple cases by dynamically adjusting its arguments based on the interface type, thereby reducing library management complexity while maintaining compatibility.
Solution Approach 2:
The argument value setting unit operates autonomously to determine and set appropriate argument values based on the interface configuration. This self-service mechanism eliminates the need for manual intervention to create and manage multiple POU versions, automatically handling compatibility requirements without increasing library management burden.
3Adaptability or versatility
If the number of arguments in a unit program is changed to enhance functionality, then the program capabilities are improved, but existing calls to the program become incompatible
Solution Approach 1:
The patent introduces dynamic argument value setting that adapts the number and values of arguments based on the interface type at runtime. The argument value setting unit dynamically determines which arguments to provide and what values to use, allowing the same unit program call to work with different numbers of arguments depending on the interface configuration, thus maintaining call compatibility while enhancing program capability.
4Reliability
If multiple versions of POUs with different interfaces are maintained in the library, then compatibility across different programs is achieved, but storage efficiency decreases
Solution Approach 1:
The patent merges multiple interface variations into a single unit program by using an argument value setting unit that adapts to different interface types. Instead of storing separate POU versions for each interface variation, the system consolidates them into one POU that dynamically adjusts its argument handling, thereby improving storage efficiency while maintaining compatibility across different programs.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Compatibility of a callable unit program configuring a user program is provided. A code generator that generates a code having a format executable by a control device from the user program generates an instruction code creating a structure storing association information associating a name of an argument with a value set to the argument with respect to a call expression, and converts the call expression into an instruction code calling the unit program using an identifier of the structure. A value of association information is set to the argument when the association information corresponding to the name of the argument is stored in the structure with respect to each argument of the unit program, an instruction code setting a predetermined value to the argument is generated when the association information is not stored.