Sample Program - User Communication Rxd - IDEC FC4A-C10R2 User Manual

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

17: U
C
SER
OMMUNICATION
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
Mini DIN Connector Pinouts
Description
Shield
NC
No Connection
NC
No Connection
TXD
Transmit Data
RXD
Receive Data
NC
No Connection
NC
No Connection
SG
Signal Ground
NC
No Connection
• Do not connect any wiring to the NC (no connection) pins; otherwise, the
Caution
barcode reader may not work correctly and may be damaged.
Description of Operation
A barcode reader is used to scan barcodes of 8 numerical digits. The scanned data is sent to 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
See page 17-5.
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
Data bits
Parity check
Stop bits
17-34
I
NSTRUCTIONS
User Communication Cable 1C
FC2A-KP1C
To RS232C Port 1
2.4m (7.87 ft.) long
Color
Pin
Cover
Black
1
Yellow
2
Blue
3
Green
4
Brown
5
Gray
6
Red
7
White
8
9600 bps
7
Even
1
« FC4A M
Attach a proper connector to the open
end of the cable referring to the cable
connector pinouts shown below.
S
U
'
M
ICRO
MART
SER
S
ANUAL
Barcode Reader
To RS232C Port
D-sub 25-pin Connector Pinouts
Pin
Description
1
FG
Frame Ground
2
TXD1 Transmit Data
3
RXD1 Receive Data
7
GND
Ground
MicroSmart
MicroSmart
»
and the
through the
.
WindLDR

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents