8 - 6 8 - 6
MELSEC-Q
8 MULTITASK PROCESSING
(1) To perform event control
In order to perform event control, the following should first be understood:
(a) The event control is enabled by defining the events in one of the BASIC
programs in advance and specifying the settings so that event generation is
enabled in that program. These definitions and settings may occur in any
program. Note also that the programs for which the definitions and settings
were specified do not have to reside in memory at the time of the event
control.
(b) If the event is only defined, the status of the event is the same as if the
setting to disable event generation (ZEVENT DISABLE) is specified.
To perform event control, it is necessary to specify the setting to enable the
event generation (ZEVENT ENABLE) in the program in which the event
was defined.
(c) To synchronize the execution with other BASIC programs using the event
control, the BASIC program which is made to wait for the event generation
has to be placed in the status where it waits for the event generation before
the event occurs.
If an event occurs but no BASIC program is waiting for the generation of the
event, the occurrence of the event becomes invalid (ignored).
(d) When performing event control, it is necessary to disable the occurrence of
the events at the system start-up and shutdown of the communication
module. (Initialization of the event information managed by the system)
Carry out one of the following:
1) Restart the power or push the RESET switch.
2) Redefine the events in the BASIC program that is executed first at the
system start-up of the communication module, or in the BASIC
program that finishes the execution lastly. (Redefine the event
handling using the DEF ZEVENT instruction.)
Example
FOR I%=0 TO 16
DEF ZEVENT I%
NEXT I%
REMARK
In the communication module, it is not possible to perform event control using the bit
devices of the PLC CPU.
However, stopped BASIC programs can be started by a command from the PLC
CPU. See Section 5.2 for the details.
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...