Synchronizing Execution Between Basic Programs (Event Control) - Mitsubishi QD51-R24 User Manual

Melesec q series
Hide thumbs Also See for QD51-R24:
Table of Contents

Advertisement

3 SPECIFICATIONS

3.13.1 Synchronizing execution between BASIC programs (Event control)

3 - 65
In multitask processing, each BASIC program is process independently.
for this reason, if data are shared between BASIC programs, it is necessary that the
receiving side read the data after confirming that the sending side has sent the data.
Event control is used to synchronize the execution of the data sending side BASIC
program and the data receiving side BASIC program.
In event control, the BASIC program that is on the data receiving side is set in the
signal wait (WAIT) state then after the sending side finishes sending the data, it gives a
signal (event) and the receiving side BASIC program reads the data.
For this reason, the data sent by the sending side can be read precisely by the
receiving side BASIC program.
In event control, the following commands are executed.
• DEF ZEVENT
• ZEVENT ENABLE : Enabling generation of the event.
• ZWAIT EVENT
• ZSIGNAL
Task 1
Program
DEF ZEVENT
( Defines the event)
ZEVENT ENABLE
( Enables the
event to occur )
ZSIGNAL
( The event occurs)
Program execution status
REMARK
Refer to the Programming Manual (Commands) concerning details on event control
and the commands used.
: Definition of the event.
: Waiting for the event.
: Generating the event.
Waiting for
the event
to occur
Resume
Program execution status
MELSEC-Q
Task 2
Program
ZWAIT EVENT
( Waiting for the
event to occur)
3 - 65

Advertisement

Table of Contents
loading

This manual is also suitable for:

Qd51

Table of Contents