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

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

Advertisement

Serial Communications Instructions
Precautions
TXD(236) can be used only for the CPU Unit's RS-232C port or one of the
Serial Communications Board's serial ports. In addition, the port must be set
to no-protocol mode.
The following send-message frame format can be set in the PLC Setup (for
the CPU Unit's RS-232C port) or the allocated DM Setup Area (for the Serial
Communications Board's ports).
• Start code: None or 00 to FF hex.
• End code: None, CR+LF, or 00 to FF hex.
The data will be sent with any start and/or end codes specified in the PLC
Setup or the allocated DM Setup Area. If start and end codes are specified,
the codes will be added to the send data (N). In this case, the maximum num-
ber of bytes that can be specified for N is 256 bytes.
Data can be sent only when the port's Send Ready Flag is ON. (The Send
Ready Flag is A39205 for the CPU Unit's RS-232C port, A35605 for Serial
Communications Board port 1, or A35613 for Serial Communications Board
port 2.)
Data is sent in the order specified in C.
Nothing will be sent if 0 is specified for N.
If RS signal control is specified in C, bit 15 of S will be used as the RS signal.
If ER signal control is specified in C, bit 15 of S will be used as the ER signal.
If RS and ER signal control is specified in C, bit 15 of S will be used as the RS
signal and bit 14 of S will be used as the ER signal.
If 1, 2, or 3 hex is specified for RS and ER signal control in C, TXD(236) will be
executed regardless of the status of the Send Ready Flag (A39205, A35605,
or A35613 depending on the port being used).
If the TXD(236) instruction is executed for a Board that does not support no-
protocol mode (a Serial Communications Board without a version number),
the Inner Board Service Disabled Flag (A42404) and the Error Flag will turn
ON.
An error will occur and the Error Flag will turn ON in the following cases.
• The CPU Unit's RS-232C port is specified, but no-protocol mode is not
set for the port in the PLC Setup.
• One of the Serial Communications Board's serial ports is specified, but
no-protocol mode is not set for the port in the allocated DM Setup Area.
• One of the Serial Communications Board's serial ports is specified, but
the Board does not support no-protocol mode (the Board does not have a
version number).
• The value of C is not within range.
• The value for N is not between 0000 and 0100 hex.
• A send was attempted when the Send Ready Flag was OFF. (The Send
Ready Flag is A39205 for the CPU Unit's RS-232C port, A35605 for Serial
Communications Board port 1, or A35613 for Serial Communications
Board port 2.)
• TXD(236) or RXD(235) was being executed for the Serial Communica-
tions Board in the cyclic task, the cyclic task was interrupted, and another
TXD(236) or RXD(235) instruction was executed for the Serial Communi-
cations Board in the interrupt task.
Note Do not program TXD(236)/RXD(235) for a Serial Communications Board's
port (port 1 or 2) in both the cyclic task and interrupt task. A TXD(236)/
RXD(235) instruction cannot be executed for the Serial Communications
Section 3-24
987

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents