Mitsubishi QD51 Programming Manual page 152

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

8 MULTITASK PROCESSING
8 - 7
(2) Execution order of the instructions when the event control is
performed
The following shows the execution order of the instructions when the execution of
the BASIC program is being controlled by the events (execution start, execution
resume). Execute in the order starting from (1).
(a) When synchronizing the execution between BASIC programs
BASIC
program (A)
BASIC
program (B)
As shown above, execute steps 1) and 2) in one program and then
generate the event while one of the programs is waiting for the event to
occur. If 4) is executed before 3), the execution cannot be synchronized.
To prevent the generated event from becoming invalid, apply interlock
between programs whose executions are to be synchronized by using an
extension relay of the communication module, etc.
BASIC
program (A)
Extension relay of the
communication module
BASIC
program (B)
Notifies that it will be waiting
for the event.
B@(EM,...)=1
1) DEF ZEVENT to Defines the event
2) ZEVENT ENABLE to Enables the event to occur
Synchronization
3) ZWAIT EVENT Waiting for the event to occur.
Check whether program B will
be waiting for the event or not.
B%=B @(EM,...)
A
OK !
MELSEC-Q
4) ZSIGNAL The event occurs.
Synchronization
8 - 7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents