Transmit, Receive Communications

Inputs/Outputs Operands Data Types
TBL VB, IB, QB, MB, SB, SMB, *VD, *AC, *LD BYTE
PORT Constant (0 for CPU 221/222/224; 0 or 1 for CPU 226 / 226XM) BYTE

Memory Ranges ENO Errors Instruction Support for S7-200 CPUs SIMATIC/International Mnemonics
The Transmit (XMT) instruction invokes the transmission of the data buffer (TBL). The first entry in the data buffer specifies the number of bytes to be transmitted. PORT specifies the communication port to be used for transmission.

The XMT instruction is used in Freeport mode to transmit data by means of the communication port(s).

The XMT instruction can be used to generate a BREAK condition by setting the number of characters to zero and then executing the XMT instruction. This generates a BREAK condition on the line for 16 bit times at the current baud rate. Transmitting a BREAK is handled in the same manner as transmitting any other message, in that a XMT interrupt is generated when the BREAK is complete and SM4.5 or SM4.6 signals the current status of the XMT.

The Receive (RCV) instruction initiates or terminates the Receive Message service. You must specify a start and an end condition for the Receive box to operate. Messages received through the specified port (PORT) are stored in the data buffer (TBL). The first entry in the data buffer specifies the number of bytes received.

Transmit: Error Conditions that Set ENO = 0:

SM4.3 (run-time), 0006 (indirect address), 0009 (simultaneous XMT/RCV on port 0), 000B (simultaneous XMT/RCV on port 1)

Receive: Error Conditions that Set ENO = 0:

SM86.6 and SM186.6 (RCV parameter error), SM4.3 (run-time), 0006 (indirect address), 0009 (simultaneous XMT/RCV on port 0), 000B (simultaneous XMT/RCV on port 1), CPU not in Freeport mode.

Freeport Communication

Receive Message

Receive Character Buffer (Freeport)

Receive Parity Error (Freeport)

Queue Overflow (Interrupts)