Condition Wait In Task - Omron SCARA YRCX Series Programming Manual

Robot controller
Hide thumbs Also See for SCARA YRCX Series:
Table of Contents

Advertisement

3.3
1
2
3
MEMO
4
NOTE
5
• If multiple tasks are in
WAIT status awaiting the
same condition event, or
different condition events
occur simultaneously, all
6
tasks for which the waited
events occur are put in
READY status.
MEMO
MEMO
6-4
Chapter 6 Multi-tasking

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
Wait for axis
Axis movement
movement to
command
complete
Parameter
command
Robot status
change command
Wait for time to elapse
Wait for condition to be met
Wait for data to send or to be received SEND
Wait for print buffer to become empty
Wait for key input
• The tasks are not put in WAIT status if the event has been established before the above
commands are executed.
Command
MOVE
MOVEI
DRIVEI
PMOVE
SERVO
WAIT ARM
ACCEL
ARCHP1
DECEL
OUTPOS
WEIGHT
CHANGE
SHIFT
MSPEED
SPEED
DELAY, SET (Time should be specified.), WAIT ARM
(Time should be specified.)
WAIT
PRINT
INPUT
MOVET
DRIVE
PATH
MOTOR
ARCHP2
AXWGHT
TOLE
ORGORD
LEFTY
ASPEED

Advertisement

Table of Contents
loading

Table of Contents