Interrupt Processing From External Devices - Mitsubishi QD51 Programming Manual

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

Advertisement

7 COMMUNICATION WITH EXTERNAL DEVICES

7.4 Interrupt Processing from External Devices

7 - 14
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".
ON COM GOSUB
COM ON
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.
Receive data
Normal processing routine
RETURN
Communication interrupt routine
MELSEC-Q
7 - 14

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents