Designing Tasks - Omron CJ2 CPU UNIT SOFTWARE User Manual

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

5 Understanding Programming
5-2-4

Designing Tasks

Guidelines
Task design is important to build a system with a high degree of reliability and easy maintenance. Pay
attention to the following points.
• Divide programming into tasks based on the following.
• Consider specific conditions for execution and non-execution with an understanding of status tran-
sitions.
• Consider the presence or absence of external I/O.
• Consider functions and personnel in charge.
• Consider execution in order of priority. Separate processing into cyclic and interrupt tasks. Assign
the lowest number to the task with the highest priority.
Example 1: Designing Tasks by Function and Personnel in Charge.
Error processing
Communications
MMI
Initial processing
Main processing
Break down
by function
Example 2: Designing Tasks by Execution Priority
Allocate lower numbers to control tasks than to processing tasks.
• Break down and design programs to ensure autonomy. Keep the amount of data exchanged between
tasks to an absolute minimum.
Organize the I/O memory used by all tasks and the I/O memory used only in individual tasks. Orga-
nize and allocate a range of I/O memory for use only by each task.
5-30
Conveying
Inspection
Assembly
Machining
Materials supply
Break down
by process
Interrupts
Overall
Input
control
process-
(may
ing
include
error
processing
in some
cases)
Break down by execution and non-execution conditions
Person D
Person C
Person B part 2
Person B part 1
Person A
Break down by
personnel in charge
Break down by function
Output
Error processing
processing
Sequence control
Analog control
Man-machine interfacing
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents