On Com Gosub ( Branches To Subroutine When An Interrupt Occurs From A Communication Line ) - Mitsubishi QD51 Programming Manual

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
ON COM GOSUB
• Defines the starting line of the processing routine to be branched to when an interrupt
occurs from a communication line.
ON COM(<channel number>) GOSUB <line number>
Syntax
channel number
line number
ON COM (1) GOSUB 1000
Examples
• The ON COM GOSUB instruction defines the starting line of the processing routine to be
Description
branched to when an interrupt is generated from a communication line.
• The following values can be specified as <channel number>.
• If the command currently being executed involves waiting for external input, such as the
INPUT instruction, the branch processing will not be executed until the current command
is finished, even if an input interrupt occurs from a communication line.
• In the same way as usual subroutines, the returning from the processing routine is carried
out by using the RETURN instruction. If RETURN is entered alone, the execution starts
from the instruction next to the ON COM GOSUB instruction. If RETURN is entered along
with a line number, the execution starts from the specified line.
11 - 157
Instruction
1 • • • • CH1 (RS-232C)
2 • • • • CH2 (RS-232C)
3 • • • • CH3 (RS-422/485)
ON COMmunication GO to SUBroutine
• • • •
Specify the communication line to generate the
interrupt.
• • • •
Specify the line number to be processed after the
interrupt.
• • • •
Branches to line 1000 if an input interrupt is
generated from the communication line CH1 (RS-
232C).
MELSEC-Q
11 - 157

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents