11 - 433 11 - 433
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Available only in execution mode
ZEVENT
Instruction
Z EVENT
• Enables or disables event generation.
ZEVENT ENABLE <event number>
ZEVENT DISABLE <event number>
Syntax
ENABLE (enable)
• • • •
Enable the event generation.
DISABLE (disable)
• • • •
Disable the event generation.
event number
• • • •
Specify the event number from 0 to 63 to be
enabled/disabled.
ZEVENT ENABLE 1
• • • •
Enables the event generation of event number 1.
Examples
ZEVENT DISABLE 0
• • • •
Disables the event generation of event number 0.
Description
• The ZEVENT instruction is used to enable or disable the event generation.
• If the event generation is enabled, the following occurs:
The event corresponding to <event number> is generated if the status of the target device
of the defined event changes from OFF (0) to ON (1) or the ZSIGNAL instruction that
specifies the same event number is executed. A program waiting for the generation of the
event, if any, can then resume execution.
• If the event generation is disabled, the following occurs:
The event corresponding to <event number> is not generated if the target device of the
defined event changes from OFF (0) to ON (1). The event is not generated either if a
ZSIGNAL instruction that specifies the same event number is executed.
Therefore, the OS does not resume the execution of waiting programs even if the above-
mentioned device changes or the ZSIGNAL instruction is executed.
• <event number> must be defined using the DEF ZEVENT instruction in advance.
• It is allowed to enable or disable the generation of the target event several times within a
program.
Whether or not the event is generated is determined by the most recent enabled/disabled
specification.
• When the event is defined, the generation of that event is set to be disabled by default.
REMARK
• See Section 8.2 for the details about the event control.
• See the DEF ZEVENT, ZSIGNAL, and ZWAIT EVENT instructions.