Shared-Memory Control for Synchronized NC and PLC Command Updates
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In factory automation, NC control devices and PLC control devices often execute programs asynchronously, leading to inconsistent data collection timings, which prevents real-time correction of command values and hinders high-accuracy control.
Innovation Solution
A control device that includes a data update part, a first program execution part scanning an entire program in each control cycle to update command values, and a second program execution part that interprets a sequentially interpreted program to generate intermediate code for calculating command values, with shared memory for accessing command values across programs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If NC control device and PLC control device execute programs asynchronously, then program execution flexibility is improved, but data collection timing consistency deteriorates
Solution Approach 1:
The control device is divided into two independent program execution units: a first program execution unit that scans and executes the first program entirely in each control cycle, and a second program execution unit that sequentially interprets the second program. Each unit operates independently with its own execution mechanism, allowing flexible program execution while maintaining synchronized data collection timing through coordinated access to shared memory.
Solution Approach 2:
Shared memory serves as an intermediary between the two program execution units. The first program execution unit stores command values in shared memory after scanning the entire first program, and the second program execution unit accesses these command values from shared memory during sequential interpretation. This intermediary mechanism ensures that both programs can access consistent data at consistent timing points without interfering with each other's execution flexibility.
2Reliability
If first program is scanned entirely in each control cycle, then command value update reliability is improved, but real-time correction capability deteriorates
Solution Approach 1:
The control system segments command value generation into two pathways: the first program execution unit generates command values through complete scanning of the first program in each control cycle, ensuring reliability; the second program execution unit generates command values through sequential interpretation, enabling real-time correction. Both pathways operate in parallel and their results are integrated through shared memory, combining reliability with real-time responsiveness.
Solution Approach 2:
The first program execution unit performs preliminary action by scanning the entire first program and storing command values in shared memory before the second program execution unit needs them. This preliminary preparation ensures that reliable command values are ready in advance, while the second program can then perform real-time corrections by accessing and modifying these pre-prepared values without waiting for the next complete scan cycle.
3Adaptability or versatility
If second program is sequentially interpreted, then program interpretation flexibility is improved, but command value calculation timing consistency deteriorates
Solution Approach 1:
Shared memory acts as an intermediary that synchronizes the second program execution unit with the control cycle timing. The second program execution unit sequentially interprets the second program and accesses command values from shared memory at specific timing points that align with the control cycle. This intermediary mechanism allows flexible sequential interpretation while maintaining timing consistency through coordinated memory access.
Solution Approach 2:
The system implements feedback by having the second program execution unit access command values generated by the first program execution unit through shared memory. The second program can read the current command values, perform sequential interpretation and calculations, and output corrected command values that are fed back to the control system. This feedback loop ensures timing consistency while maintaining the flexibility of sequential interpretation.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
In a control device which can execute a first program entirely scanned in each control cycle to update a command value, and a sequentially interpreted second program, an environment for realizing higher control performance is provided. The control device (100) includes a first program execution part (50) scanning the entire first program (62) in each control cycle to update a command value (72) and a second program execution part (56) updating a command value (74) in each control cycle according to a sequentially interpreted second program (64). The second program execution part includes an interpreter (58) generating an intermediate code and a command value operation part (60) calculating the command value in each control cycle according to the intermediate code. The command value operation part outputs the command value in each control cycle so that the command value can be used in other processes.