Omron CJ - REFERENCE MANUAL 10-2009 Reference Manual page 862

Table of Contents

Advertisement

3. Instructions
Start code / end code settings and send data
1
2
3
4
5
6
Hint
• When sending data to another device by TXD instruction, the device may require that the data be
sent at certain intervals. In that case, a transmission delay time can be set to adjust the transmission
intervals.
Precautions
• 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 Board in the interrupt task if a TXD(236)/RXD(235) instruction is being executed for
the Serial Communications Board in the cyclic task. An error will occur and the ER Flag will be turned
ON if a TXD(236)/RXD(235) instruction is executed for the Serial Communications Board in the
interrupt task when another TXD(236)/RXD(235) instruction was being executed for the Serial
Communications Board in the cyclic task. (These instructions cannot be programmed in both the
cyclic and interrupt tasks even if they are executed for different ports in the Serial Communications
Board.)
• 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.
• Data can be sent only when the port's Send Ready Flag is ON. (The Send Ready Flag is A392.05 for
the CPU Unit's RS-232C port, A356.05 for Serial Communications Board port 1, or A356.13 for Serial
Communications Board port 2.)
• Nothing will be sent if 0 is specified for N.
• 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 (A424.04)
and the Error Flag will turn ON.
824
N bytes of data is sent in the following order when
sending the most significant bytes first is specified:
1, 2, 3, 4, 5, 6
No Start or End Code
Only Start Code
Only End Code
123456···
Start and End Code
CR+LF End Code
123456···
Start and CR+LF End Code
CPU Unit's built-in RS·232C port or one of the
Serial Communications Board's serial ports
123456···
123456···
123456···
CR LF
Send bytes before
CR+LF: 256 max.
123456···
Data sent.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
N send bytes: 256 max.
Send bytes after ST:
256 max.
Send bytes before ED:
256 max.
Send bytes between
ST and ED: 256 max.
Send bytes between ST
and CR+LF: 256 max.

Advertisement

Table of Contents
loading

Table of Contents