8 - 4 8 - 4
MELSEC-Q
8 MULTITASK PROCESSING
(3) Execution order when BASIC programs are executed
simultaneously
The following explains the execution order of each program when multiple BASIC
programs are executed at start-up.
In reality, the BASIC programs do not operate (execute) by themselves. Each
BASIC program operates together with the system program according to the
scheduling by the system of the communication module.
When multiple BASIC programs run in parallel, the communication module
selects (gives execution privilege to) the program with the highest priority among
the executable programs (see the previous page) in the queue at the time of
switching execution of each program. Then it lets the program execute until the
next execution switching occurs. By repeating this operation, the communication
module allows multiple programs to run in parallel.
Priority (high)
Priority (low)
Programs that became
executable are sorted
by their priorities and
are placed in the queue.
The program with the highest
priority or which entered
the queue the earliest is
executed first.
n
n
Queue
3
1
2
2
The program given the execution privilege by the OS goes into the execution
status and executes the specified instructions as shown in the figure above. It
makes a transition to the next status when the switching of the execution occurs.
Makes a transition to
another status
according to the
instruction executed
immediately before
the switching of the
execution.
Execution status
Executable status
Wait status
Sleep status
Stop status
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...