10: U
SER
C
OMMUNICATION
I
NSTRUCTIONS
10-12
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
Transmit Data Byte Count
The data register next to the device designated for transmit status stores the byte count of data transmitted by the TXD
instruction. When BCC is included in the transmit data, the byte count of the BCC is also included in the transmit data
byte count.
Example:
Data register D100 is designated as a device for transmit status.
D100
Transmit status
D101
Transmit data byte count
Programming TXD Instruction Using WindLDR
The following example demonstrates how to program a TXD instruction including a start delimiter, BCC, and end delimiter
using WindLDR.
TXD sample program:
S1
12
D1
M10
I0
SOTU
TXD
1
D2
D100
Communication port:
Port 1
Transmit completion output:
M10
Transmit status register:
D100
Transmit data byte count:
D101
Data register contents:
04D2h
D10
162Eh
D11
= 1234
= 5678
Transmit data example:
STX
(02h)
D10
“1”
(31h)
“2”
(32h)
“3”
(33h)
“4”
(34h)
“5”
(35h)
“8”
(38h)
BCC
(41h)
ETX
(03h)
BCC
“6”
(36h)
“7”
(37h)
BCC calculation range
Constant
D11
Constant
(H)
BCC
(36h)
(L)
(hex)
(hex)
1.
Start to program a TXD instruction. Move the cursor where you want to insert the TXD instruction, and type
TXD
. You can
also insert the TXD instruction by clicking the User Communication icon in the menu bar and clicking where you want to
insert the TXD instruction in the program edit area.
The Transmit instruction dialog box appears.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]