7 - 8 7 - 8
MELSEC-Q
7 COMMUNICATION WITH EXTERNAL DEVICES
7.3.2 Communication with a terminal
The following explains how to communicate with a terminal connected to either the RS-
232C or the RS-422/RS-485 interface of the communication module, as well as
precautions when carrying out the communication.
Items described in this section do not apply to a terminal connected to an interface
that is designated as a console by the DIP switch of the communication module.
(1) To display data on the terminal screen
2) Specify the channel number of the interface to which the terminal used for screen output is
connected using the ZODV instruction.
ZODV <channel number>
3) Use the following instructions to output to the terminal screen or to control the screen:
Displays data on the screen of the specified terminal.
PRINT USING
Displays data on the screen of the specified terminal.
(Format can be specified.)
LOCATE
Specifies the data display location at the specified terminal screen.
CLS
Clears the screen of the specified terminal.
Note that the TAB and SPC functions can also be used with the PRINT instruction.
4) Close the interface and switch the output destination back to the console to finish the screen
display.
ZCLOSE # <channel number>
ZODV 0
1) Open the interface and specify communication parameters as well as the Kanji code conversion
according to the terminal to be used.
ZOPEN # <channel number>, <control table>
ZCNTL # <channel number>, 0, <control table>
KMODE <conversion specification>
A
D51H
Hallo!!
ZODV • • • • • •
PRINT • • • • • •
Terminal
When the ZODV or ZIDV instruction is used to switch screen display to the terminal,
the key codes for the cursor control keys and the function keys of the terminal are
automatically converted to the codes that correspond to the communication module.
The refore, it is more convenient to use these instructions than to use the ZSEND and
ZRECEIVE instructions described in Section 7.3.3.