823
Serial Communications Instructions Section 3-23
• End code: None, CR+LF, or 00 to FF hex. If no end code is specified, the
number of bytes to received is set from 00 to FF hex (1 to 255 decimal; 00
specifies 256 bytes).
The Reception Completed Flag will turn ON when the number of bytes speci-
fied in the PLC Setup has been received. When the Reception Completed
Flag turns ON, the number of bytes in the Reception Counter will have the
same value as the number of receive bytes specified in the PLC Setup or the
allocated DM Setup Area. If more bytes are received than specified, the
Reception Overflow Flag will turn ON.
If an end code is specified in the PLC Setup, the Reception Completed Flag
will turn ON when the end code is received or when 256 bytes of data have
been received. If more data is received after the Reception Completed Flag
turns ON, the Reception Overflow Flag will turn ON.
When RXD(235) is executed, data is stored in memory starting at D, the
Reception Completed Flag will turn OFF, and the Reception Counter will be
cleared to 0. If the Reception Overflow Flag has turned ON, it will also turn
OFF.
Data will be stored in memory in the order specified in C.
If 0 is specified for N, the Reception Completed Flag will be turned OFF, the
Reception Counter will be cleared to 0, and nothing will be stored in memory.
If CS signal monitoring is specified in C, the status of the CS signal will be
stored in bit 15 of D.
If DR signal monitoring is specified in C, the status of the DR signal will be
stored in bit 15 of D.
If CS and DR signal monitoring is specified in C, the status of the CS signal
will be stored in bit 15 of D and the status of the DR signal will be stored in bit
14 of D.
Receive data will not be stored if CS or DR signal monitoring is specified.
If 1, 2, or 3 hex is specified for RS and ER signal control in C, RXD(235) will
be executed regardless of the status of the Receive Completed Flag.
An error will occur and the Error Flag will turn ON in the following cases.
• The no-protocol mode (RS-232C mode) is not set for the port in the PLC
Setup.
• The value of C is not within range.
• The value for N is not between 0000 and 0100 hex.
Read the data using RXD(235) as soon as possible after the Reception Com-
pleted Flag turns ON. If reception is continued without reading the data, the
reception buffer will overflow and data reception will stop. If this occurs, the
port will have to be restarted to recover operation.
The reception buffer is not cleared when RXD(235) is executed. Thus, more
than one RXD(235) instruction can be used to read the data.