17: U
SER
C
OMMUNICATION
I
NSTRUCTIONS
17-34
« FC4A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
»
Sample Program – User Communication RXD
This example demonstrates a program to receive data from a barcode reader with a RS232C port using the user communi-
cation RXD1 (receive) instruction.
System Setup
Description of Operation
A barcode reader is used to scan barcodes of 8 numerical digits. The scanned data is sent to the
MicroSmart
through the
RS232C port 1 and stored to data registers. The upper 8 digits of the data are stored to data register D20 and the lower 8
digits are stored to data register D21.
Setting User Communication Mode in WindLDR Function Area Settings
Since this example uses the RS232C port 1, select User Protocol for Port 1 in the Function Area Settings using
WindLDR
.
Setting Communication Parameters
Set the communication parameters to match those of the barcode reader. See page 17-5. For details of the communication
parameters of the barcode reader, see the user’s manual for the barcode reader. An example is shown below:
Communication Parameters:
Baud rate
9600 bps
Data bits
7
Parity check
Even
Stop bits
1
To RS232C Por t
D-sub 25-pin Connector Pinouts
Pin
Description
1
FG
Frame Ground
2
TXD1 Transmit Data
3
RXD1 Receive Data
7
GND
Ground
Barcode Reader
Mini DIN Connector Pinouts
Description
Color
Pin
Shield
—
Cover
NC
No Connection
Black
1
NC
No Connection
Yellow
2
TXD
Transmit Data
Blue
3
RXD
Receive Data
Green
4
NC
No Connection
Brown
5
NC
No Connection
Gray
6
SG
Signal Ground
Red
7
NC
No Connection
White
8
To RS232C Por t 1
User Communication Cable 1C
FC2A-KP1C
2.4m (7.87 ft.) long
Attach a proper connector to the open
end of the cable referring to the cable
connector pinouts shown below.
Caution
•
Do not connect any wiring to the NC (no connection) pins; otherwise, the
MicroSmart
and the
barcode reader may not work correctly and may be damaged.
Summary of Contents for FC4A-C10R2
Page 1: ...FC4A SERIES Micro Programmable Logic Controller User s Manual FC9Y B812 ...
Page 6: ...PREFACE 4 FC4A MICROSMART USER S MANUAL ...
Page 94: ...2 MODULE SPECIFICATIONS 2 74 FC4A MICROSMART USER S MANUAL ...
Page 184: ...6 ALLOCATION NUMBERS 6 20 FC4A MICROSMART USER S MANUAL ...
Page 218: ...8 ADVANCED INSTRUCTIONS 8 8 FC4A MICROSMART USER S MANUAL ...
Page 240: ...11 BINARY ARITHMETIC INSTRUCTIONS 11 8 FC4A MICROSMART USER S MANUAL ...
Page 244: ...12 BOOLEAN COMPUTATION INSTRUCTIONS 12 4 FC4A MICROSMART USER S MANUAL ...
Page 252: ...13 SHIFT ROTATE INSTRUCTIONS 13 8 FC4A MICROSMART USER S MANUAL ...
Page 274: ...15 WEEK PROGRAMMER INSTRUCTIONS 15 8 FC4A MICROSMART USER S MANUAL ...
Page 378: ...22 DUAL TEACHING TIMER INSTRUCTIONS 22 4 FC4A MICROSMART USER S MANUAL ...
Page 386: ...23 INTELLIGENT MODULE ACCESS INSTRUCTIONS 23 8 FC4A MICROSMART USER S MANUAL ...
Page 408: ...24 ANALOG I O CONTROL 24 22 FC4A MICROSMART USER S MANUAL ...
Page 426: ...26 COMPUTER LINK COMMUNICATION 26 6 FC4A MICROSMART USER S MANUAL ...