App - 42 App - 42
MELSEC-Q
APPENDIX
Appendix 7.5 How to Clear Reception Data Stored in the Receive Buffer
If 1 or greater is specified in the receive buffer specification when the communication
channel is opened, the data received from the external device is stored in the receive
buffer of the specified size.
Use one of the methods indicated below to clear the reception data stored in the
receive buffer and then store data received later in the receive buffer anew.
1) Close the currently open target communication channel, then reopen it.
2) Specify the number of requested characters for the size of the receive buffer and
the timeout value as 1 using the ZRECEIVE instruction, then request to receive
data.
All of the data returned by this reception request will be ignored.
3) Change the setting value using the ZCNTL instruction.
Appendix 7.6 Sending or Receiving Character Data of 256 Bytes or More
When sending or receiving character data of 256 bytes or more to/from an external
device in non procedure mode via the RS-422 interface or RS-232C interface, divide
the data into units of a maximum 255 bytes.
This must be done because a BASIC program cannot handle character data of 256
bytes or more per transmission or reception request.
Receive buffer
• •
•
•
• •
•
•
• •
• •
•
•
• •
•
The user divides
and enters the data.
ZRECEIVE # to
ZRECEIVE # to
ZRECEIVE # to
Reception
(Example of reception)
Data entered at one time,
among the data received
• •
•
•
• •
•
• •
•
•
• •
•
•
• •
Data entered at one time,
among the data received
Data entered at one time,
among the data received
Data that must be sent
The user divides
the data into units
of maximum 255
bytes per unit.
Data transmitted
at one time
Data transmitted
at one time
Data transmitted
at one time
ZSEND # to
ZSEND # to
ZSEND # to
Transmission
Transmission
Transmission
• •
•
•
•
• • • •
•
• •
•
•
• •
(Example of transmission)
Each is stored in the character
variable or character array variable.
(This will become the output element.)