11 - 469 11 - 469
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
Available only in execution mode
ZSIGNAL
Instruction
Z SIGNAL
• Generates the specified event from within a program.
ZSIGNAL <event number>
Syntax
event number
• • • •
Specify the event to be generated using the event
number from 0 to 63 defined by the DEF ZEVENT
instruction.
Examples
ZSIGNAL 10
• • • •
Generates the event defined as event number 10.
Description
• The ZSIGNAL instruction generates the specified event from a program.
If one program enables the generation of the target event using the ZEVENT instruction in
advance, all programs waiting for the generation of a particular event can resume their
execution when the ZSIGNAL instruction is executed for that event.
• The program that has generated the event executes the next statement regardless of
whether or not there is another program that waits for the event generation.
• The event should be defined using the DEF ZEVENT instruction and the event generation
should be enabled/disabled using the ZEVENT instruction. In addition, the ZWAIT EVENT
instruction is used to make a program wait for the generation of a particular event (to
synchronize the execution with other programs).
• Make sure to enable the event generation using the ZEVENT instruction in advance. Once
this is achieved, the event can be generated in order to start (or resume) the execution of
other programs that are being paused, or the same event number can be specified in
other programs. If the event generation is not enabled, the event control cannot be
performed even if the ZSIGNAL instruction is executed.
REMARK
• See Section 8.2 for the details about the event control.
• See the DEF ZEVENT, ZEVENT, and ZWAIT EVENT instructions.