11 - 93 11 - 93
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
If the 03
H
code (BREAK code) is entered from a keyboard other than the console keyboard
(a terminal connected to the communication port), the BASIC program reads it as data.
Therefore, note that the BASIC program cannot be stopped.
Description
• For the input from the keyboard, the program continues waiting for the input of number of
characters specified by <numeric expression>. If the buffer contains the data that has
already been entered, the characters are read from the beginning of the buffer.
The entered characters are not displayed on the screen.
Reading from a sequential file
• When <file number> is specified after <numeric expression>, a character string of
<numeric expression> characters are read from the sequential file.
• <file number> specifies the file number set by the OPEN instruction to the corresponding
sequential file.
• When reading from a file, all of the delimiters are read as data.
• An “Input past end” error occurs if there is no data to read when trying to read from a file.
Reading from a communication port of the communication module
• If <port number> is specified after <numeric expression>, input is accepted from CH1(RS-
232C), CH2(RS-232C), and CH3(RS-422) of the communication module.
• Specify <port number> as follows:
CH1(RS-232C)
• • • •
1
CH2(RS-232C)
• • • •
2
CH3(RS-422)
• • • •
3
• All the codes including 00
H
code as well as characters can be read as data by the input
from a port.
Therefore, the BASIC program reads the 03
H
code (BREAK code) as data, and note that
the BASIC program is not stopped.
• <wait time> sets the duration to wait for the data input.
The value can be set from 0 to 255 seconds.
A “Time out error” occurs if the input of the number of bytes specified by <numeric
expression> has not occurred within the specified duration.
When 0 is specified to <wait time> or when <wait time> is omitted, the program continues
waiting until the input of the number of characters specified by <numeric expression>
occurs.
• If the buffer contains the data that has been already entered when reading from a port, the
characters are read from the beginning of the buffer.
Содержание 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...