Txd1 (transmit 1), Txd2 (transmit 2), Txd1 (transmit 1) -6 txd2 (transmit 2) -6 – IDEC MicroSmart User Manual

Page 284

Advertising
background image

17: U

SER

C

OMMUNICATION

I

NSTRUCTIONS

17-6

« FC4A M

ICRO

S

MART

U

SER

S

M

ANUAL

»

TXD1 (Transmit 1)

Applicable CPU Modules

TXD2 (Transmit 2)

Applicable CPU Modules

Valid Operands

For the valid operand number range, see pages 6-1 and 6-2.

Internal relays M0 through M1277 can be designated as D1. Special internal relays cannot be designated as D1.

Transmit data designated by operand S1 can be a maximum of 200 bytes.

When transmission is complete, an output or internal relay, designated by operand D1, is turned on.

Destination 2 occupies two consecutive data registers starting with the operand designated by D2. The transmit status data
register, D0 through D1298 or D2000 through D7998, stores the status of transmission and error code. The next data regis-
ter stores the byte count of transmitted data. The same data registers can not be used as transmit status registers for TXD1/
TXD2 instructions and receive status registers for RXD1/RXD2 instructions.

The TXD1/TXD2 instructions cannot be used in an interrupt program. If used, a user program execution error will result,
turning on special internal relay M8004 and the ERR LED on the CPU module.

Precautions for Programming TXD Instruction

The MicroSmar t has five formatting areas each for executing TXD1 and TXD2 instructions, so five TXD1 and five TXD2
instructions can be processed at the same time. If inputs to more than five TXD1 or TXD2 instructions are turned on at the
same time, an error code is set to the transmit status data register, designated by operand D2, in the excessive TXD
instructions that cannot be executed.

If the input for a TXD instruction is turned on while another TXD instruction is executed, the subsequent TXD instruction is
executed 2 scan times after the preceding TXD instruction is completed.

Since TXD instructions are executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should
be used as required.

FC4A-C10R2/C

FC4A-C16R2/C

FC4A-C24R2/C

FC4A-D20K3/S3

FC4A-D20RK1/RS1 & FC4A-D40K3/S3

X

X

X

X

X

FC4A-C10R2/C

FC4A-C16R2/C

FC4A-C24R2/C

FC4A-D20K3/S3

FC4A-D20RK1/RS1 & FC4A-D40K3/S3

X

X

X

X

Operand

Function

I

Q

M

R

T

C

D

Constant

Repeat

S1 (Source 1)

Transmit data

X

X

D1 (Destination 1)

Transmit completion output

X

▲ — — — —

D2 (Destination 2)

Transmit status register

X

When input is on, data designated by S1 is conver ted into a specified
format and transmitted through por t 1 to a remote terminal with an
RS232C por t.

TXD
1

S1

*****

D1

*****

D2

*****

When input is on, data designated by S1 is conver ted into a specified
format and transmitted through por t 2 to a remote terminal with an
RS232C. Upgraded CPU modules can also use the RS485 por t.

TXD
2

S1

*****

D1

*****

D2

*****

Advertising