PLC-PC Shared Data Interface for Automatic Control Program Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In classical PC applications, significant manual modifications are required when there are changes to PLC applications, such as adding new sensors or actuators, leading to increased development time and potential human errors.
Innovation Solution
A method to automatically generate a PC program using a graphical user interface (GUI) based on data from the PLC program's source code, sharing a common data section for both PC and PLC programs, which eliminates the need for manual adaptation and reduces development time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If manual adaptation of PC program is performed when PLC application evolves, then PC program can access newly added elements, but development time increases and human errors are introduced
Solution Approach 1:
The patent applies preliminary action by pre-defining a data section template in the PLC program source code that automatically generates the corresponding PC program structure. When new sensors or actuators are added to the PLC, the template mechanism automatically incorporates them into the PC program without requiring manual adaptation, thus resolving the contradiction between adaptability and development time.
Solution Approach 2:
The patent uses copying by creating a shared data section that serves as a common source for both PLC and PC programs. This data section is copied/generated automatically from the PLC source code to the PC program, ensuring consistency and eliminating manual adaptation work. The shared data section acts as a single source of truth that both systems reference.
2Adaptability or versatility
If manual adaptation of PC program is performed when PLC application evolves, then PC program can access newly added elements, but human errors are introduced
Solution Approach 1:
The patent eliminates human errors by copying the data section definition from the PLC program source code directly to generate the PC program. This automatic copying process ensures that the PC program accurately reflects the PLC program structure without manual intervention errors. The shared data section serves as a single source of truth that both systems reference, preventing inconsistencies.
Solution Approach 2:
The patent implements feedback by having the PC program automatically read and regenerate its data section from the PLC program source code. This creates a feedback loop where any changes in the PLC program are automatically reflected in the PC program through regeneration, ensuring consistency and eliminating errors that would arise from manual adaptation.
3Productivity
If shared data section is used for both PC and PLC programs, then automatic generation is achieved and development time is saved, but system complexity increases
Solution Approach 1:
The patent applies universality by creating a shared data section that serves multiple functions: it defines the data structure for the PLC program, serves as the source for automatic PC program generation, and acts as the common interface between both systems. This single multi-functional element increases productivity while the modular design keeps the apparent complexity manageable.
Solution Approach 2:
The patent uses segmentation by separating the data section definition from the program logic. The data section is segmented as a distinct, reusable component that can be independently defined and automatically propagated to both PLC and PC programs. This segmentation allows the complex task of maintaining consistency to be handled automatically, reducing the perceived complexity for developers.
Data Source
Figure 1
Figure 2~3
Figure 4
AI summary
The present invention relates to a method for controlling a PLC using a PC program (220), wherein a source code of a PLC program includes a data section (100), the data section (100) including data indicating services to be exposed by the PLC when running the PLC program, wherein a source code (210) of the PC program is automatically generated using the data included in the data section (100) and a PC program template (200), wherein the PLC is controlled using the PC program (220) generated from the automatically generated source code (210) of the PC program.