11 - 126 11 - 126
MELSEC-Q
11 INSTRUCTIONS AND FUNCTIONS
LINE INPUT
Instruction
LINE INPUT
• Stores the entire line (255 characters or less) of the key input into a character string
variable without any delimiters.
LINE INPUT [” <display character string> ”;] <character string variable>
display character string
• • • •
Specify the characters to display in front of the
character string variable.
Syntax
character string variable
• • • •
Specify the character string variable for storage.
Examples
LINE INPUT”DATA-”;A$
• • • •
The data entered via the keyboard is stored in A$
after the Enter key is pressed.
Description
• The LINE INPUT instruction stops the program temporarily and performs key input from the
keyboard specified by the ZIDV instruction.
• A question mark (?) as with the INPUT instruction is not be displayed when the LINE
INPUT instruction is used.
• All characters entered until the Enter key is pressed is assigned to the <character string
variable> when the LINE INPUT instruction is used.
• The following keyboards can be used for key input.
The console keyboard
Keyboard from the terminal connected to the communications port
• When the <display character string> is specified, the character string specified will be
displayed on the screen specified by the ZODV instruction prior to the key input.
• When only the Return key is pressed without entering character string data, <character
string variable> will assume that an empty character string has been entered.
• When performing data entry using a terminal connected to the communications port, the
port must be open via the ZOPEN instruction and the input destination must be specified
with the ZIDV instruction.
• When using an input console by using the ZODV instruction from a console other than
what is specified by the console using the DIP SW on the communications main unit, the
key codes for the following key input will be assigned to the variable specified by the
<variable name>.
• Ctrl + C , Ctrl + S , Ctrl + Q , and Break
Therefore, note that programs cannot be stopped ( Ctrl + C or Break ).