IDEC FC4A-C10R2 User Manual page 302

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

17: U
C
SER
OMMUNICATION
Receive Data Byte Count
The data register next to the operand designated for receive status stores the byte count of data received by the RXD
instruction. When a start delimiter, end delimiter, and BCC are included in the received data, the byte counts for these
codes are also included in the receive data byte count.
Example: Data register D200 is designated as an operand for receive status.
D200
D201
User Communication Receive Instruction Cancel Flag M8022/M8023
Special internal relays M8022 and M8023 are used to cancel all RXD1 and RXD2 instructions, respectively. While the
has completed receive format and is ready for receiving incoming data, turning on M8022 or M8023 cancels
MicroSmart
all receive instructions for port 1 or port 2, respectively. This function is useful to cancel receive instructions only, without
stopping the
MicroSmart
To make the cancelled RXD instructions active, turn off the flag and turn on the input to the RXD instruction again.
Programming RXD Instruction Using WindLDR
The following example demonstrates how to program a RXD instruction including a start delimiter, skip, BCC, and end
delimiter using
WindLDR
D1 for the receive completion output. Data register D200 is used as destination D2 for the receive status, and data register
D201 is used to store the receive data byte count.
Receive data example:
STX
"1"
"2"
(02h)
(31h)
(32h)
Start
Delimiter
RXD sample program:
RXD
SOTU
1
I0
1. Start to program a RXD instruction. Move the cursor where you want to insert the RXD instruction, and type RXD.
You can also insert the RXD instruction by clicking the User Communication icon in the menu bar and clicking where
you want to insert the RXD instruction in the program edit area, then the Transmit dialog box appears. Click RXD to
change the dialog box to the Receive dialog box.
The Receive instruction dialog box appears.
17-24
I
NSTRUCTIONS
Receive status
Receive data byte count
.
. Converted data is stored to data registers D20 and D21. Internal relay M20 is used as destination
BCC calculation range
"3"
"4"
"5"
"6"
(33h)
(34h)
(35h)
(36h)
Skip
Stored to D20
S1
D1
D2
16
M20
D200
« FC4A M
"7"
"8"
"9"
"0"
"A"
(37h)
(38h)
(39h)
(30h)
(41h)
Stored to D21
Communication port:
Receive completion output:
Receive status register:
Receive data byte count:
S
U
'
M
ICRO
MART
SER
S
ANUAL
BCC
BCC
"B"
ETX
(H)
(L)
(42h)
(03h)
(39h)
(32h)
BCC
End
Delimiter
Port 1
M20
D200
D201
»

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents