17: USER COMMUNICATION INSTRUCTIONS17-34 « FC4A MICRO SMART USER ’S MANUAL »Sample Program – User Communication RXDThis example demonstrates a program to receive data from a barcode reader with a RS232C port using the user communi-cation RXD1 (receive) instruction.System SetupDescription of OperationA barcode reader is used to scan barcodes of 8 numerical digits. The scanned data is sent to the MicroSmart through theRS232C port 1 and stored to data registers. The upper 8 digits of the data are stored to data register D20 and the lower 8digits are stored to data register D21.Setting User Communication Mode in WindLDR Function Area SettingsSince this example uses the RS232C port 1, select User Protocol for Port 1 in the Function Area Settings using WindLDR.See page 17-5.Setting Communication ParametersSet the communication parameters to match those of the barcode reader. See page 17-5. For details of the communicationparameters of the barcode reader, see the user’s manual for the barcode reader. An example is shown below:Communication Parameters:Baud rate 9600 bpsData bits 7Parity check EvenStop bits 1To RS232C PortD-sub 25-pin Connector PinoutsPin Description1 FG Frame Ground2 TXD1 Transmit Data3 RXD1 Receive Data7 GND GroundBarcode ReaderMini DIN Connector PinoutsDescription Color PinShield — CoverNC No Connection Black 1NC No Connection Yellow 2TXD Transmit Data Blue 3RXD Receive Data Green 4NC No Connection Brown 5NC No Connection Gray 6SG Signal Ground Red 7NC No Connection White 8To RS232C Port 1User Communication Cable 1CFC2A-KP1C2.4m (7.87 ft.) longAttach a proper connector to the openend of the cable referring to the cableconnector pinouts shown below.Caution • Do not connect any wiring to the NC (no connection) pins; otherwise, the MicroSmart and thebarcode reader may not work correctly and may be damaged.