Mitsubishi QD51 Programming Manual page 265

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
INPUT#
Instruction
• Reads data from a sequential file.
INPUT # <file number>, <variable name> [, <variable name> , ...]
Syntax
file number
variable name
INPUT#2, A
Examples
• The INPUT# instruction reads data from a sequential file and stores it in a variable.
Description
• <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.
11 - 95
INPUT #
• • • •
• • • •
• • • •
REMARK
See the INPUT$ and LINE INPUT# functions, LOF and OPEN instructions, and
Chapter 6.
Specify the file number of the sequential file that was
opened by the OPEN instruction.
Specify the variable where the read data is stored.
Reads numeric data from the sequential file that was
opened by file number 2, then assigns it to A.
MELSEC-Q
11 - 95

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents