PLC Application Execution Across Task Cycles With Timed Interrupts
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In factory automation, application programs executed periodically on control apparatuses like PLCs often face challenges where execution time fluctuates, leading to incomplete processing within preset task cycles, degrading control performance and requiring labor-intensive source code modifications for debugging and adjustments.
Innovation Solution
A method and apparatus for generating an application program that includes adding a first command to the source code to interrupt and resume execution after a preset time within each task cycle, allowing processing to span multiple cycles without manual source code changes, using an execution module with commands for state management, interrupt timers, and control parameters.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If the application program is executed continuously without interruption, then the processing can be completed within the task cycle, but the execution time may exceed the preset task cycle causing control performance degradation
Solution Approach 1:
The patent applies periodic action by interrupting the application program execution at predetermined intervals within each task cycle. The execution is divided into multiple segments across consecutive task cycles, with each cycle executing a portion of the total processing required. This periodic interruption ensures that no single task cycle exceeds the preset time limit while still completing the full processing sequence over multiple cycles, thereby maintaining control performance.
2Manufacturing precision
If the source code is modified to complete processing within the preset task cycle, then the control performance is maintained, but the modification work and debugging labor increase
Solution Approach 1:
The patent implements self-service by automatically generating the interrupted execution structure through the build process without requiring manual source code modification. The system automatically divides the application program into segments that can be executed across multiple task cycles, and automatically manages the state information persistence. This eliminates the need for programmers to manually modify source code to achieve periodic execution, significantly reducing modification work and debugging labor while maintaining control performance.
3Duration of action of moving object
If the application program is interrupted and resumed in the next task cycle, then the execution time is controlled within preset limits, but the complexity of state management increases
Solution Approach 1:
The patent uses state information as an intermediary mechanism to bridge between consecutive task cycles. When the application program is interrupted, the current execution state is automatically saved to persistent storage. Upon resumption in the next task cycle, this state information is automatically restored, allowing the program to continue from where it left off. This intermediary state management mechanism automates the complexity of tracking and preserving execution context, reducing the burden on programmers while enabling controlled execution time across multiple cycles.
Data Source
AI summary
Provided is an environment for executing an application program included in a task to be periodically executed every fixed task cycle within a predetermined task cycle. A method includes: receiving input of a source code of the application program, and generating an execution module of the application program by adding, to the source code of the application program, a first command for interrupting the application program after executing the application program for a preset time within the task cycle and resuming execution of the application program in the next task cycle.


