11 - 92 11 - 92
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
IPUT$
Function
INPUT $
• 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> )
INPUT$ ( <numeric expression> , # <file number> )
INPUT$ ( <numeric expression> , % <port number> [, <wait time> ] )
numeric expression
• • • •
Specify the length of a character string to be read.
file number
• • • •
Specify the file number of the sequential file that was
opened by the OPEN instruction
port number
• • • •
Specify the port number of port opened by the
ZOPEN instruction.
Syntax
wait time
• • • •
Specify the wait time for the data entry from the
communication port in seconds.
A$=INPUT$(3)
• • • •
Reads three characters from the keyboard at the
console and assigns them to A$.
B$=INPUT$(10, #1)
• • • •
Reads ten characters from the sequential file opened
by the file number 1, then assigns them to B$.
Examples
C$=INPUT$(7, %1, 20)
• • • •
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.
Description
• The INPUT$ function reads and returns number of characters specified by <numeric
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 + C , Ctrl + S , Break key (Processes exactly as key operation.)
Codes that correspond to 00
H
, 80
H
, and FD
H
to FF
H
• 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
code and keys that correspond to the DC1/DC3 codes that were specified by the
ZCNTL instruction.
Содержание 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...