![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h-asc02/sysmac-c200h-asc02_operation-manual_742429050.webp)
40
<m> is an integer expression from 0 to 255.
<string 2> is a string expression.
Example:
MID$(A$,2,4) = “ABCDEFGH”
Remarks:
The characters in <string 1>, beginning at position <n> are replaced by the
characters in <string 2>.
The optional <m> refers to the number of characters from <string 2> that will
be used in the replacement. If <m> is omitted, all of <string 2> is used. How-
ever, regardless of whether <m> is included, the replacement of characters
never goes beyond the original length of <string 1>.
Refer to the discussion of the MID$ function
ON COM GOSUB Statement
Purpose:
Defines an interrupt service routine to handle data coming into a
com port buffer
Format:
ON COM(<n>) GOSUB <line>
<n> is the port number (1 or 2).
<line> is the line number of the first statement of the interrupt
service routine.
Example:
ON COM1 GOSUB 1000
Remarks:
This statement is not valid unless it is executed after the specified port has
been opened.
An interrupt service routine cannot be interrupted by another interrupt. If a
new interrupt occurs during processing of a previous interrupt, branching to
handle the new interrupt will not take place until after the RETURN statement
of the first interrupt service routine is executed. This means that, depending
on the branch timing, nothing may be in the buffer when execution branches
to the interrupt routine. It is therefore necessary to check whether data is in
the buffer by executing the LOC or EOF Command at the beginning of the
interrupt routine.
All subroutines must end with a RETURN statement.
If a statement specified by the branch line number is non-executable, execu-
tion will begin with the first executable statement following the branch line
number.
If zero is specified as the branch line number, it is assumed that the COM
OFF statement has been executed.
If the port number is omitted, port 1 is selected.
The ON COM GOTO statement is enabled with the COM ON statement and
disabled with the COM OFF statement.
Program Example:
10
OPEN #1, “COMU:(40)”
20
ON COM GOSUB 100
30
COM ON
40
PC READ “@D,0,2,2I4”;A,B
50
PRINT A, B
60
GOTO 30
BASIC Language
Section 4-2
Содержание SYSMAC C200H-ASC02
Страница 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Страница 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Страница 122: ...Appendix B Specifications 115 130 35 100 5 ...
Страница 167: ...Cat No W165 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor ...
Страница 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...