7 - 12 7 - 12
MELSEC-Q
7 COMMUNICATION WITH EXTERNAL DEVICES
7.3.4 Communication with other external devices
The following explains how to communicate with external devices, other than terminals
and printers, which are connected either to the RS-232C or the RS-422/RS-485
interface of the communication module, as well as precautions when carrying out the
communication.
(1) To transmit data • • • Use the ZSEND instruction.
1) Open the interface and specify the communication parameters according
to the external device to be used.
ZOPEN # <channel number>, <control table>
ZCNTL # <channel number>, 0, <control table>
2) Prepare the data to transmit, then specify the number of bytes of transmission data an
the timeout in the control table used for the ZSEND instruction.
3) Execute the ZSEND instruction.
ZSEND # <channel number>, <control table>, <output element>
When the execution of the ZSEND instruction is completed, the number of bytes
of transmitted data is stored in the control table used for the ZSEND instruction.
A
D51H
ZSEND
"ABCD • • • • • • "
4) An error occurs if the data was not sent normally. In this case, check the condition
of the communication line, the communication parameters of the interface,
the contents of the control table, etc.
• There are many potential reasons why the communication
cannot be performed correctly.
They could be cables, connectors, parameters, etc • • •.
Please check each possible cause one by one even though
it's time consuming.
• When the ZSEND instruction is used, the Kanji code conversion
using the ZCNTL and KMODE instructions cannot be performed.
REMARK
• Timeout • • • Specifies the time (in seconds) that is allowed to pass from the start
of the communication before a timeout error occurs if the
communication for some reason did not finish.
Содержание 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...