Def Zevent ( Defines An Event, And Defines An Event By Bit Device ) - Mitsubishi QD51 Programming Manual

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
DEF ZEVENT
• Defines an event for synchronizing execution between the programs.
• Defines an event by the expansion relay (EM) of the communication module.
DEF ZEVENT
Syntax
DEF ZEVENT
event number
device
DEF ZEVENT 1
Examples
DEF ZEVENT 3, "EM0001"
• Defines various events that are used for multitask operations.
Description
• An event is a signal for controlling another BASIC program from a BASIC program.
Definition of an event generated by the ZSIGNAL instruction
• Defines an event for synchronizing execution with another BASIC program. In this case,
specify only <event number> and do not specify <device>.
• Events generated by the ZSIGNAL instruction are generated only by the ZSIGNAL
instruction. After defined by the DEF ZEVENT instruction, this event is used for resuming
execution of a BASIC program that is waiting for the event, after enabling this event by the
ZEVENT instruction and executing the ZSIGNAL instruction.
11 - 54
Instruction
(event number)
(event number), <device>
Program A
DEF ZEVENT 1
ZEVENT ENABLE 1
ZSIGNAL 1
DEFine Z EVENT
• • • •
Specify a number that represents the event defined
by this instruction.
• • • •
Specify a communication module's expansion relay
(EM) that generates an event by turning ON.
• • • •
Defines an event as event number 1 that is
generated by the ZSIGNAL instruction in order to
synchronize between the programs.
• • • •
Defines an event, which is generated when the
communication module's expansion relay EM0001 is
turned ON, as event number 3.
1)
1)
Event occurs
ZWAIT EVENT 1
(Resume execution)
2)
2)
Program B
1) and 2) indicate the range
of execution during the same
period of time when two
programs are running
concurrently.
MELSEC-Q
11 - 54

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents