Control Device Segments Global Variable Access
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional Programmable Automation Controllers (PACs) face issues with maintaining consistent operations when multiple tasks access a global variable, as updates by one task can disrupt the operations of other tasks referencing the variable.
Innovation Solution
The control device and system program implement a configuration where only the update task is allowed to update the global variable, while reference tasks access reference data corresponding to the global variable, ensuring that reference tasks do not encounter inconsistent values during their execution, and a collection unit accumulates and manages this data for tracing purposes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple tasks are allowed to access and update global variables in parallel, then task execution flexibility and productivity are improved, but operational consistency and reliability deteriorate due to value updates during task execution
Solution Approach 1:
The patent segments the global variable access into two distinct types: update tasks that modify global variables and reference tasks that only read reference data. This segmentation prevents reference tasks from being disrupted by updates during execution, while still allowing multiple tasks to access global variables through the reference data mechanism, thus maintaining both productivity and reliability
Solution Approach 2:
The patent introduces reference data as an intermediary between tasks and global variables. Reference tasks access global variables indirectly through reference data copies rather than directly accessing the global variable itself. This intermediary mechanism ensures that reference tasks operate on stable data values while update tasks can modify global variables without disrupting running reference tasks
2Ease of operation
If reference tasks directly access global variables, then data access simplicity is improved, but data consistency deteriorates due to potential updates during task execution
Solution Approach 1:
The patent implements preliminary action by creating reference data copies of global variables before reference tasks execute. The reference data is updated to reflect current global variable values at the start of each reference task cycle, ensuring that tasks operate on consistent data snapshots without directly accessing the global variable during execution
Solution Approach 2:
The patent uses copying by creating reference data as copies of global variable values. Each reference task operates on its own copy (reference data) rather than directly accessing the master global variable, which prevents read-write conflicts while maintaining data consistency throughout task execution
Data Source
Figure 1
Figure 2~3
Figure 4~5
AI summary
A control device includes a task execution unit; a storage unit which stores a variable in a program, which is capable of being referenced and updated; and a collection unit which collects a variable when a task is executed. The storage unit stores reference data corresponding to the variable. A plurality of tasks include: an update task which is capable of updating and referencing the variable; and a reference task which is capable of referencing the reference data. The collection unit collects the reference data when the plurality of tasks are executed.