Mitsubishi QD51 Programming Manual page 651

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

Advertisement

APPENDIX
Appendix 2 Precautions on Interrupt Processing
Cause of
interrupt
App - 6
It is possible to activate an interrupt processing routine by the following causes in
AD51H-BASIC.
1) Starting up a subroutine due to an interrupt from one of the communication devices
connected to the various interfaces of the communication module (ON COM
GOSUB instruction)
2) Executing an error handling routine when an error occurs (ON ERROR GOTO
instruction)
Since the two types of interrupt processing routines above perform the processing
when an interrupt occurs due to the occurrence of their respective cause, it is
impossible to tell at which position in the program the interrupt processing routine is
executed.
Therefore, if an interrupt processing routine contains instructions to display characters
or the ZIDV and ZODV instructions that switch the console, the settings of the
character display position and the console switching may become disrupted as shown
in the example below.
Create the program in such a way that characters are not displayed or the console
switched during the interrupt processing routine.
Example
This example shows a case where characters are displayed during an interrupt
processing.
10 ON COM (1) GOSUB 100
20 COM (1) ON
50 LOCATE 5, 10
60 PRINT "Program normal"
90 GOTO 30
100 REM
Interrupt processing
110 LOCATE 5, 20
120 PRINT "An interrupt from the RS-232C interface (1)"
130 RETURN
The execution restarts from
the instruction immediately
after the line where
the interrupt occurred.
5 digits
Program normal
Line 10
5 digits
Line 10
Program normal
An interrupt from the
RS-232C interface (1)"
Line 20
Program normal
The PRINT instruction in line 60 is executed
here due to the LOCATE instruction in line 110
and the PRINT instruction in line 120.
MELSEC-Q
This is what
is displayed
normally.
App - 6

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents