8 - 1 8 - 1
MELSEC-Q
8 MULTITASK PROCESSING
8
8 MULTITASK PROCESSING
8.1 Multitask Processing
Multitask processing refers to executing multiple programs simultaneously on a single
device. In AD51H-BASIC, it is possible to perform multitask processing of a maximum
of eight BASIC programs on the AD51H-S3, a maximum of two on the A1SD51S, and
a maximum of two on the QD51(-R24).
Multitasking means executing multiple (multi) programs (tasks).
There is only one main CPU (central processing unit) in the communication module.
Multitasking accomplishes parallel operations by successively switching between the
execution of multiple programs. The processing speed of the main CPU is very fast, so
to the human eye it appears as if it is processing multiple programs simultaneously.
Indicates the task
being executed.
Indicates the
switching between
the tasks.
When there are four tasks
The numbers in the
circles indicate the
order of processing
by the CPU.
1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
Task
No.1
Task
No.2
Task
No.3
Task
No.4
Simultaneously executed BASIC programs operate for the execution time allocated by
the OS (50ms or 100ms) and are then switched by the OS.
The switching of the execution of each program by the OS (scheduling by the OS)
during the parallel processing occurs according to the priority of each program (refer to
Section 8.4, Execution Priority) and when any of the following situations occurs.
• When a data input/output (communication) instruction is executed to the screen,
keyboard, disk, peripheral device, or external device.
• When an instruction for controlling the program execution (interrupt, stop, or
terminate), or an instruction for controlling multitasking (synchronizing the execution,
starting, changing priorities) is executed
• When the interrupt status of the program execution is released (when input/output is
finished, specified time has elapsed, etc.)
• When the program has been executed continuously for a specified time (50ms or
100ms) (execution of multi-statements, etc.)
See Appendix 3 for the instructions for switching the program execution.
REMARK
• Changing the execution time is supported by the AD51H-S3 only. The execution
time is fixed to 50ms for the A1SD51S and QD51 (-R24).
• Use the DIP switch of the AD51H module to switch the execution time (to 50ms or
100ms). For details, see the AD51H User's Manual (Hardware).
• The switching between tasks according to the above-mentioned execution time
may occur in the middle of executing an instruction, but the processing is carried
out normally.
Содержание 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...