11 - 90 11 - 90
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
INPUT
Instruction
INPUT
• Data entry from the keyboard.
INPUT [“ <character string to be displayed> “;] <variable name> [, <variable name>, …]
character string to be
displayed
• • • •
Specify a character constant to display when
requesting an input.
Syntax
variable name
• • • •
Specify a variable where the entered data is stored
Examples
INPUT “Target number=”;M
• • • •
Displays “Target number=” on the console screen
and waits for the next input. When data is entered,
stores the entered data in M.
Description
• The INPUT instruction temporarily stops the program execution and displays a question
mark (?) on the screen specified by the ZODV instruction. Once the question mark is
displayed, you can enter data from the keyboard specified by the ZIDV instruction.
• If <character string to be displayed> is specified, the character string is displayed before
the question mark on the screen specified by the ZODV instruction.
•. The entered data is assigned to the variable specified by <variable name>.
• The number of data items to be entered must match the specified <variable name> counts.
The variable specified by <variable name> is a numeric variable or a character string
variable (including an array variable).
The type of each data item to be entered must match the type of <variable name>.
(Entry of a character string to the INPUT instruction does not have to be enclosed by the
double quotation marks.)
If the number of items or type of the data to be entered to the INPUT instruction does not
match, a message “?Redo from start” is displayed and waits for an input again. If there are
more data items than the number of <variable> items, “Extra ignored” is displayed and the
next instruction is executed.
• Delimit data items by a comma (,).
• The INPUT instruction continues waiting for the data entry until the Enter key (enter
code) is entered.
• You cannot enter a comma (,) and a double quotation mark (“) by the INPUT instruction.
Use the LINT INPUT instruction to enter these characters.
• When input is made from a terminal other than the one specified as the console by DIP
switch setting of the communication module’s main unit with the ZIDV instruction, the
following key input is assigned to the variable specified by <variable name> without
conversion.
Ctrl + C , Ctrl + S , Break
Keys that correspond to DC1/DC3 specified by the ZCNTL instruction
Therefore, note that the program execution cannot be stopped ( Ctrl + C , Break ).
Содержание 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...