Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 869

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Serial Communications Instructions
Precautions
836
RXDU(255) can be used only for a Serial Communications Unit's serial port
that has been set to no-protocol mode.
The following receive-message frame formats can be set in the allocated DM
Setup Area.
• Start code: None or 00 to FF hex.
• End code: None, CR+LF, or 00 to FF hex. If no end code is specified, the
number of bytes to be received is set from 01 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 the allocated DM Setup Area 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 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 allocated DM Setup Area, 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.
Reception will be stopped if 259 bytes of data are received. If more data is
input after that, the Overrun Error Flag and Transmission Error Flag will turn
ON.
When more data is input to the Serial Communications Option Board's serial
port than is specified in N, that data will be discarded when the next
RXDU(255) instruction is executed.
When RXDU(255) is executed, data is stored in memory starting at D, the
Reception Completed Flag will turn OFF (even if the Reception Overflow Flag
(note 3) is ON), and the Reception Counter will be cleared to 0.
Data will be stored in memory in the order specified in C.
If 0 is specified for N, the Reception Completed Flag and Reception Overflow
Flag will be turned OFF, the Reception Counter will be cleared to 0, and noth-
ing 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 DR signal control in C, RXDU(255) will
be executed regardless of the status of the Receive Completed Flag.
RXDU(255) uses a logical port (because it sends an internal FINS command)
to output a receive sequence command to a Serial Communications Unit.
Since SEND(090), RECV(098), CMND(490), PMCR(260), and TXDU(256)
also use logical ports 0 to 7, RXDU(255) cannot be executed for a logical port
if that logical port is already being used by one of those instructions or another
RXDU(255) instruction.
Section 3-23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents