8 - 2 8 - 2
MELSEC-Q
8 MULTITASK PROCESSING
8
(1) Status transition of a BASIC program
The following describes how the status of one BASIC program changes (status
transition) after the start of its execution.
The program operation status can be roughly divided into four. Once the execution is
started, the program operates in parallel with other programs while changing its status
among 1) through 3) described below. The status changes to 4) when the END
instruction is executed and 5) when the SYSTEM instruction is executed.
1) Execution status
__________ A status where the program is currently being
executed.
2) Executable status __________ A status where the program can immediately
make a transition to the execution status if the
execution privilege is given to it from the OS
when the switching of executions occurs.
3) Wait status
__________ A status where the program waits for the
completion of input/output or the release of an
execution interrupt while an input/output
instruction is being executed to the screen,
keyboard, disk, peripheral device, or external
device, or an execution interrupt instruction is
being executed.
4) Sleep status
__________ A status where the program is not currently
executed (other than 1) through 3)). While in
the sleep status, the program can be restarted
by using the ZSTART instruction.
5) Stop status
__________ A status where no program is being executed
by the AD51H.
1)
2)
4)
5)
3)
Execution status
When an input/output is completed
When the execution interrupt
is released
When the END instruction
is executed.
Stop status
Wait status
• Execution of the STOP
or SYSTEM instruction
• Execution stop by the Break key
or Ctrl + C keys
• Occurrence of errors
• Changing the key switch from
RUN to STOP
Executable status
When an input/output instruction or
execution interrupt instruction is executed:
• Input/output interaction with files or
external devices
• Waiting for a time
• Waiting for an elapsed time
• Waiting for an event to occur.
etc.
Sleep status
Scheduling by the OS
(switching executions)
• ZSTART instruction
• Started by the PLC
• Powering on
• Changing the
key switch from
STOP to RUN