Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 1056

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Serial Communications Instructions
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 00 to FF hex (1 to 256 decimal;
00 specifies 256 bytes).
The Reception Completed Flag (note 1) will turn ON when the number of
bytes specified the allocated DM Setup Area has been received. When the
Reception Completed Flag turns ON, the number of bytes in the Reception
Counter (note 2) 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 (note 3) will turn ON.
If an end code is specified in the allocated DM Setup Area, the Reception
Completed Flag (note 1) 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 (note 1) turns ON, the Reception Overflow Flag
(note 3) 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 (note 4) and Transmission Error Flag
(note 5) will turn ON.
When more data is input to the Serial Communications 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 (note 1) will turn OFF (even if the Reception Over-
flow Flag (note 3) is ON), and the Reception Counter (note 2) 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 (note 1) and Reception
Overflow Flag (note 3) will be turned OFF, the Reception Counter (note 2) 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 DR signal control in C, RXDU(255) will
be executed regardless of the status of the Receive Completed Flag (note 1).
RXDU(255) uses a logical port (because it sends an internal FINS command)
to output a receive sequence command to a Serial Communications Unit or
CS-series Serial Communications Board. 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.
To ensure that RXDU(255) is not executed while the logical port is busy, pro-
gram the port's Communications Port Enabled Flag (A20200 to A20207) as a
normally open condition.
Section 3-24
1017

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents