IDEC MicroSmart User Manual

Page 313

Advertising
background image

17: U

SER

C

OMMUNICATION

I

NSTRUCTIONS

« FC4A M

ICRO

S

MART

U

SER

S

M

ANUAL

»

17-35

Configuring Barcode Reader

The values shown below are an example of configuring a barcode reader. For actual settings, see the user’s manual for the
barcode reader.

Allocation Numbers

Ladder Diagram

When the

MicroSmart

starts operation, the RXD1 instruction is executed to wait for incoming data. When data receive is

complete, the data is stored to data registers D20 and D21. The receive completion signal is used to execute the RXD1
instruction to wait for another incoming data.

RXD1 Data

Synchronization mode

Auto

Read mode

Single read or multiple read

Communication parameter

Baud rate:

9600 bps

Parity check:

Even

Data bits:

7

Stop bit:

1

Other communication settings

Header:

02h

Data echo back:

No

Output timing:

Output priority 1

Data output filter: No
Sub serial:

No

Terminator:

03h

BCR data output:

Yes

Character suppress: No
Main serial input:

No

Comparison preset mode

Not used

M100

Input to star t receiving barcode data

M101

Receive completion output for barcode data

M8120

Initialize pulse special internal relay

D20

Store barcode data (upper 4 digits)

D21

Store barcode data (lower 4 digits)

D100

Receive status data register for barcode data

D101

Receive data byte count data register

M8120

M8120 is the initialize pulse special internal relay used to set M100.

At the rising edge of M100, RXD1 is executed to be ready for receiving
data.

Even after M100 is reset, RXD1 still waits for incoming data.

When data receive is complete, M101 is turned on, then M100 is set to
execute RXD1 to receive the next incoming data.

END

S1
10

D2

D100

D1

M101

M101

RXD
1

M100

M100

S

M100

R

M101

R

M100

S

STX

(02h)

ETX

(03h)

Data Register

D20

B4

2

End Delimiter

D20, ASCII to BCD Conversion (4 digits), Repeat: 2

Star t Delimiter

Advertising