11 - 95 11 - 95
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
INPUT#
Instruction
INPUT #
• Reads data from a sequential file.
INPUT # <file number>, <variable name> [, <variable name> , …]
file number
• • • •
Specify the file number of the sequential file that was
opened by the OPEN instruction.
Syntax
variable name
• • • •
Specify the variable where the read data is stored.
Examples
INPUT#2, A
• • • •
Reads numeric data from the sequential file that was
opened by file number 2, then assigns it to A.
Description
• The INPUT# instruction reads data from a sequential file and stores it in a variable.
• <file number> is the number used for opening the sequential file for input by the OPEN
instruction.
• <variable name> indicates a variable where the data item in the file is assigned to. The
type of the data item in the file must match that of the variable name.
• If the data item is a numeric value, the first character other than space, enter, and line feed
is considered as the beginning of the numeric value and the end of the numeric value is
indicated by a space, enter, line feed, or comma.
• When reading a data item of a character string, the first character other than space, enter,
or line feed is considered as the beginning of the character string data item.
If this first character is a double quotation mark (“), the character string includes all
characters between the first double quotation mark and the second double quotation mark.
A double quotation mark cannot be included as a character in a character string that is
enclosed by double quotation marks.
If the first character of a character string is not a double quotation mark, the end of the
character string is indicated by either a comma or Enter.
The maximum number of characters that can be read is 255.
If there is no delimiter (Enter, comma) within 255 characters, the entire 255 characters are
read as one character string.
• If the program reaches the end of file while reading numeric data or character string data,
the data item ends at that point.
REMARK
See the INPUT$ and LINE INPUT# functions, LOF and OPEN instructions, and
Chapter 6.
Содержание 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...