7 - 9 7 - 9
MELSEC-Q
7 COMMUNICATION WITH EXTERNAL DEVICES
(2) To enter data from the keyboard of a terminal
2) Specify the channel number of the interface to which the terminal used for keyboard input is
connected using the ZIDV instruction.
ZIDV <channel number>
3) Use the following instructions (functions) to enter data from the keyboard of the terminal.
Note, however, that some instructions (functions) cannot handle certain character codes.
4) Close the interface and switch the input source back to the console to finish entering data.
ZCLOSE # <channel number>
ZIDV 0
Please be careful not
to enter codes that
cannot be handled.
1) Open the interface and set the communication parameters according to the terminal to be used.
ZOPEN # <channel number>, <control table>
ZCNTL # <channel number>, 0, <control table>
INPUT
Character codes 0 through 1Fh (control codes), 2Ch (comma), and 7Fh
( Delete ) cannot be handled as data.
LINE INPUT
Character codes 0 through 1Fh (control codes) and 7Fh ( Delete )
cannot be handled as data.
INKEY$
INPUT$
(numerical expression)
Character code 0h cannot be handled as data.
Be careful about the following points when entering data from the keyboard of a terminal.
• The program cannot be stopped by pressing the Break / Ctrl + C keys when entering
data from an external device other than the console via the ZIDV instruction.
The code 03H is entered when the INKEY$ or INPUT$ function is used.
• If the DC1/DC3 control is activated for the interface to which the terminal is connected and a code
corresponding to DC1 or DC3 is entered, the DC1/DC3 control is carried out and data cannot be
entered.
• Do not use keys which are equivalent to the Esc key or the FDH code on the terminal.
Data may not be input correctly.