Iput - Mitsubishi QD51 Programming Manual

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS

IPUT$

Function
• Returns a character string of the specified length after reading from the keyboard of the
console.
• Returns a character string of the specified length after reading from a sequential file.
• Returns a character string of the specified length after reading from the communication
port of the communication module.
INPUT$ ( <numeric expression> )
Syntax
INPUT$ ( <numeric expression> , # <file number> )
INPUT$ ( <numeric expression> , % <port number> [, <wait time> ] )
numeric expression
file number
port number
wait time
A$=INPUT$(3)
Examples
B$=INPUT$(10, #1)
C$=INPUT$(7, %1, 20)
• The INPUT$ function reads and returns number of characters specified by <numeric
Description
expression> from the keyboard, sequential file, or a communication port.
• <numeric expression> specifies the length of character string to be read.
Specify the length from 1 to 255 range.
Reading from the keyboard
• If nothing is specified after <numeric expression>, input from the keyboard specified by the
ZIDV instruction is accepted.
• All of the keys except for the following keys or codes can be read from the keyboard that is
specified as the console.
Ctrl +
Codes that correspond to 00
• All the keys can be entered from the keyboard other than the console's keyboard (a
console connected to the communication port), except for the keys that correspond to the
00
H
ZCNTL instruction.
11 - 92
INPUT $
C , Ctrl +
code and keys that correspond to the DC1/DC3 codes that were specified by the
• • • •
Specify the length of a character string to be read.
• • • •
Specify the file number of the sequential file that was
opened by the OPEN instruction
• • • •
Specify the port number of port opened by the
ZOPEN instruction.
• • • •
Specify the wait time for the data entry from the
communication port in seconds.
• • • •
Reads three characters from the keyboard at the
console and assigns them to A$.
• • • •
Reads ten characters from the sequential file opened
by the file number 1, then assigns them to B$.
• • • •
Reads seven characters from CH1(RS-232C) of the
communication module and assigns them to C$.
"Time out error" occurs if twenty seconds elapses
before reading seven characters.
S , Break key (Processes exactly as key operation.)
, 80
, and FD
to FF
H
H
H
H
MELSEC-Q
11 - 92

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents