![background image](http://html.mh-extra.com/html/omron/scara-yrcx-series/scara-yrcx-series_programming-manual_1633413070.webp)
1
2
3
4
5
6
6-4 Chapter 6 Multi-tasking
3.3
Condition wait in task
A task is put in the WAIT status (waiting for an event) when a command causing WAIT status is
executed for that task. At this time, the transition to READY status does not take place until the wait
condition is canceled.
1. When a command causing WAIT status is executed, the following transition happens.
■
Task for which a command causing WAIT status is executed
→
WAIT status
■
Task at the head of the ready queue with higher priority
→
RUN status
• For example, when a MOVE statement (a command that establishes WAIT status)
is executed, the CPU sends a "MOVE" instruction to the driver, and then waits for
a "MOVE COMPLETED" reply from the driver. This is "waiting for an event" status.
In this case, WAIT status is established at the task which executed the MOVE command, and that
task is moved to the end of the ready queue. RUN status is then established at the next task.
2. When an event waited by the task in the WAIT status occurs, the following status
transition takes place by task scheduling.
■
Task in the WAIT status for which the awaited event occurred
→
READY status
However, if the task put in the READY status was at the head of the ready queue with the
highest priority, the following transition takes place.
1) Task that is currently in RUN status
→
READY status
2) Task at the head of the ready queue with higher priority
→
RUN status
• In the above MOVE statement example, the task is moved to the end of the ready queue. Then,
when a "MOVE COMPLETED" reply is received, this task is placed in READY status.
Tasks are put in WAIT status by the following commands.
Event
Command
Wait for axis
movement to
complete
Axis movement
command
MOVE
DRIVEI
SERVO
MOVEI
PMOVE
WAIT ARM
MOVET
PATH
DRIVE
MOTOR
Parameter
command
ACCEL
DECEL
WEIGHT
ARCHP1
OUTPOS
ARCHP2
TOLE
AXWGHT
ORGORD
Robot status
change command
CHANGE
MSPEED
SHIFT
SPEED
LEFTY
ASPEED
Wait for time to elapse
DELAY, SET (Time should be specified.), WAIT ARM
(Time should be specified.)
Wait for condition to be met
WAIT
Wait for data to send or to be received SEND
Wait for print buffer to become empty PRINT
Wait for key input
INPUT
• The tasks are not put in WAIT status if the event has been established before the above
commands are executed.
MEMO
NOTE
•
If multiple tasks are in
WAIT status awaiting the
same condition event, or
different condition events
occur simultaneously, all
tasks for which the waited
events occur are put in
READY status.
MEMO
MEMO
Содержание SCARA YRCX Series
Страница 1: ... 7 6HULHV DW 1R 1 5 5RERW RQWUROOHU 352 5 00 1 0 18 6 5 5RERWV 5 6HULHV ...
Страница 2: ......
Страница 20: ......
Страница 26: ......
Страница 27: ...Chapter 2 Constants 1 1 Outline 2 1 2 2 Numeric constants 2 1 3 3 Character constants 2 2 ...
Страница 28: ......
Страница 32: ......
Страница 52: ......
Страница 54: ......
Страница 61: ...Chapter 5 Multiple Robot Control 1 1 Overview 5 1 2 2 Command list with a robot setting 5 2 ...
Страница 62: ......
Страница 66: ......
Страница 76: ......
Страница 78: ......
Страница 92: ......
Страница 328: ......
Страница 408: ......
Страница 409: ...Chapter 11 User program examples 1 1 Basic operation 11 1 2 2 Application 11 8 ...
Страница 410: ......
Страница 432: ......
Страница 488: ......
Страница 489: ...Chapter 13 Appendix 1 1 Reserved word list 13 1 2 2 Changes from conventional models 13 3 ...
Страница 490: ......
Страница 496: ......
Страница 497: ...Index ...
Страница 498: ......
Страница 504: ......
Страница 505: ......
Страница 506: ... DW 1R 1 XWKRUL HG LVWULEXWRU 3ULQWHG LQ XURSH ...