Industrial Automation
Industrial Automation | Europe


Main > Product Type > Automation Systems > PLCs
Minimize Text   Default    Enlarge Text


Why Won't My TXD/TXDU Instructions Work Correctly?

This article provides basic configuration and diagnostic information of the TXD/TXDU instructions for PLCs such as CJ1, CS1 and CP1.
The TXD/TXDU instructions included in C-series PLC instruction sets provide a method for transmitting a specified number of bytes of data from a RS-232C port to an external serial device. This is intended to provide tips and general information about implementing RS-232 communications with these instructions. There are several manuals that provide more details for specific applications and implementations as listed below.
- Sysmac CJ Series CPU Unit Software User's Manual (Cat. No. W473)
- Sysmac CS/CJ Series Programming Manual (Cat. No. W394)
- Sysmac CS/CJ/NSJ Instructions Reference Manual (Cat. No W474)
- Sysmac CS/CJ Serial Communications Boards and Serial Communications Units Operation Manual (Cat. No. W336)
- Sysmac CP Series CP1L/CP1H CPU Unit Programming Manual (Cat. No. W451)
- Sysmac CP Series CP1E Unit Software User's Manual (Cat. No. W480) 


Preliminary Information

It is very important to collect preliminary information prior to attempting serial communications with the TXD/TXDU instructions. Examine the external serial device and gather the following key information:

- Baud Rate (300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200)
- Data Bits (7, 8)
- Stop Bits (1, 2)
- Parity (Even, Odd, None)
- Communication pin/connection assignments and RS/ER signal control
- Start Code, End Code details (if present and what)


General Procedure

1. Connect the serial communications signals with the appropriate cable ensuring proper wiring
2. Adjust the PLC Setup or Unit Setup to configure the RS-232 Port for Baud Rate, Data and Stop Bits, Parity and RS-232C/No-Protocol Mode (check PLC dip switch settings when applicable)
3. Create and execute the program utilizing the TXD/TXDU instruction


Other Tips and Common Mistakes

Wiring/Pin Assignment Mistakes

The images below depict several 9-pin assignments for common Omron Serial Ports:



CJ1 Built-In RS-232C Port


Serial Communication Units



Dip Switch Positions

Check the positions of dip switches on the CPU if using a built-in or option board serial port. These switches may override the mode of the port chosen in the PLC setup.


Start Code/End Code

The start code determines the beginning of the incoming message to the device. If this is incorrect, the external device will ignore the message. The End Code determines the end of the incoming message to the device such as a carriage return, line feed (CR, LF). If this is incorrect, overflow conditions may occur. Some devices rely on a specified amount of data to be received as the End Code indication. It is important to understand these details about the external device before attempting to transmit data.


Use a Terminal Emulator 

There are several software programs that allow a PC to receive data transmitted from the PLC when executing a TXD/TXDU instruction (a serial port is required). This is helpful to examine the data being sent from the PLC and also to confirm settings. A few software programs for serial data examination are listed below:
- Hyperterminal (installed with some Windows operating systems)
- MultiWay link


LED indicators

Carefully examining the transmit and receive indicators on the PLC system at the moment of TXD/TXDU execution can be a simple indication that data is being sent. 


Cycle Power After PLC Settings

Sometimes, cycling power after making PLC Setup changes is required for the settings to take effect

There are several settings and hardware configurations that must be made to ensure transmission of data with the TXD/TXDU PLC instruction. This article serves as a general guide for common problems implementing this function. Refer to the appropriate Omron manual for more details and explanations.


Comments (View All Comments / Add Comment)

Related Articles
No related articles found.
Created 2008-09-11
Modified 2013-12-18
Views 14332


You are not logged in.