7 - 14 7 - 14
MELSEC-Q
7 COMMUNICATION WITH EXTERNAL DEVICES
7.4 Interrupt Processing from External Devices
It is possible to define "communication interrupt routines" whose execution can be
started when data from the external device is received by the AD51H-BASIC program.
The "communication interrupt routine" should be defined beforehand using the ON
COM GOSUB instruction. The ON COM GOSUB instruction specifies a line number or
a label. When data is received from the external device, the execution is started from
the line with the specified line number or label.
In addition, communication interrupts need to be enabled using the COM instruction in
advance in order to execute the "communication interrupt routine".
Receive data
ON COM GOSUB
COM ON
RETURN
Communication interrupt routine
Normal processing routine
Any processing can be executed within the "communication interrupt routine" using the
BASIC instructions. It is possible to return to the point where the processing was
interrupted due to the execution of the "communication interrupt routine" by using the
RETURN instruction when the interrupt processing is completed.
In order to return to a line with a specified line number or label, specify the line number
or label after the RETURN instruction.
If a GOTO instruction is used to return to the normal
processing from the communication interrupt
processing, the communication interrupt processing
cannot be executed when the communication interrupt
occurs again.
Содержание 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...