Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 1 of 1

Bulletin 2755 Bar Code Decoder to PLC-5/30/40/60 ASCII User Port Application Note, pages 1 to 8

Pages 1 to 8 of 8

The original document is the PDF (72 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 2755-DS

Page 1

Application Note Bulletin 2755 Bar Code Decoder to PLC-5/30/40/60

A–B

ALLEN-BRADLEY

Bulletin 2755 Bar Code Decoder to PLC-5/30/40/60 ASCII User Port Application Note Overview

The New Generation processors from Allen–Bradley have a user port that can be used to interface a single point Series 2755 Bar Code Decoder using either RS-232 or RS-422 communication. This document includes cable diagrams for a variety of Bulletin 2755 bar code decoders, configuration information for the 2755-DS/DD decoder, as well as an example program necessary to establish communication through User Port 0 on the PLC-5 platform.

Hardware Requirements

Implementation of the procedure described in this application note requires the following Allen-Bradley hardware:

• • • • •

2755-DS/DD Enhanced Bar Code Decoder and related manuals. Bulletin 1785 PLC-5 processor. Bulletin 1771 rack. Bulletin 1771 power supply. Appropriate cables to program the PLC-5 and configure the Bulletin 2755 bar code decoder. Refer to hardware manuals for cable requirements. • Catalog Number 1478-KT card installed in your personal computer to enable you to program the PLC-5.

Software Requirements

Implementation of the procedure described in this application note requires the following Allen-Bradley software:

• Bulletin 6200 development software for the PLC-5. • Terminal Emulation Package (such as or Terminal) to configure the 2755 DS/DD with a personal computer.

1

Page 2

Application Note Bulletin 2755 Bar Code Decoder to PLC-5/30/40/60

Related Publications

This document refers to the following publications, which should be available for reference while working through this application note: Publication Number 1785-XXX 6200-XXX

Title User Manual for your PLC-5 Programming Manual for your PLC-5 Bulletin 2755-DS/DD Series B Enhanced Decoder User Manual

2755-833

Configuration

For this application the PLC-5 occupies the PLC slot in a 1771 rack. Power is supplied externally or from an internal power supply installed in any acceptable slot in the 1771 rack. Figure 1 Configuring PLC-5 to Bulletin 2755 DS/DD Bar Code Decoder Bulletin 1771 Chassis

User Port 0

Power Supply

PLC-5

RS-232 or RS-422 Host Port

Scan Head Bulletin 2755 DS/DD Bar Code Decoder

Cabling Cabling connecting the Host port of the Bulletin 2755–DS/DD Enhanced Bar Code Decoder to User Port 0 on the PLC-5 must be constructed. For RS-422 installations, a special pinout cable must be constructed. Refer to the figures below for cabling diagrams.

2

Page 3

Application Note Bulletin 2755 Bar Code Decoder to PLC-5/30/40/60

Figure 2 RS-232 Cable Diagrams (PLC-5 to 2755 Bar Code Decoder) PLC-5/30, /40, /60 User Port 0

2755-DM6/9 DD/DS NEMA1

2 3 7

3 2 7

PLC-5/30, /40, /60 User Port 0

2755-DD/DS NEMA4

2 3 7

B C D

Figure 3 RS-422 Cable Diagrams (PLC-5 to 2755 Bar Code Decoder) PLC-5/30, /40, /60 PIN

2755-DS/DD Bar Code Decoder NEMA 1 NEMA 4 PIN PIN

2 TXD+

RXA– –16

S

14 TXD–

RXB+ –17

T

3 RXD+

TXA– –16

R

16 RXD–

TXB+ –16

P

18 19

Terminators

U Note: Maximum run length 200 feet

V

PLC-5 Configuration Set the PLC-5 “Channel 0” to USER as shown in the Channel Overview screen illustrated in Figure 4. Configure Channel 0 as shown in the User Mode Channel 0 Configuration illustrated in Figure 5. Note that Termination 1 is set for \0xd or Carriage Return [CR], and ’Termination 2” is set for \0xa or Line Feed [LF]. These terminators, along with the ARL instruction in the PLC-5, allow the User port to read in one message at a time with [CR] [LF] terminators.

3

Page 4

Application Note Bulletin 2755 Bar Code Decoder to PLC-5/30/40/60

Figure 4 Channel Overview Screen Channel Overview

Channel 0

USER

Channel 1A: Channel 1B:

DH+ SCANNER MODE

Channel 3A:

UNUSED

Press a function key or enter a value.

Rem RUN Forces: None Channel Config F5

Accept Edits F1

5/30 Addr 1 BAR_CODE Channel Status F7

Select Option F10

Figure 5 Channel O Configuration Screen User Mode Channel 0 Configuration Diag. file: Remote mode change: Mode attention char.: Baud rate: Stop bits: Control line:

0 DISABLED \0x1b

XON/XOFF: System mode char.: User mode char.:

DISABLED S U

9600 1 NO HANDSHAKING

Parity: Bits per Character:

NONE 8

Echo/Delete mode: Termination 1: Termination 2:

DISABLED \0xd \0xa

RTS send delay (20 ms): RTS off delay (20 ms): Append 1: Append 2:

0 0 \0xd \0xa

Press a function key or enter a value.

Rem RUN Accept Edits F1

4

Forces: None

5/30 Addr 1 BAR_CODE Chan 0 Select Status Option F9 F10

Page 5

Application Note Bulletin 2755 Bar Code Decoder to PLC-5/30/40/60

2755-DS/DD Enhanced Bar Code Decoder Configuration An example configuration for the 2755-DS/DD Bar Code Decoder appears in Figure 6 and Figure 7. Notice that the END MESSAGE is set to [CR] [LF]. Note that the settings illustrated below represent only part of the configuration required for the 2755-DS/DD Enhanced Bar Code Decoder to work in a given application. Refer to the decoder documentation for complete details on decoder configuration. Figure 6 2755-DS/DD Host Communications Configuration Screen.

Figure 7 2755-DS/DD Host Message Format Configuration Screen.

5

Page 6

Application Note Bulletin 2755 Bar Code Decoder to PLC-5/30/40/60

PLC-5 Program The sample ladder logic listing appearing in Figure 8 below instructs the PLC-5 to:

• Rung 2:0 – Read one string of ASCII data terminated with a [CR] [LF]. • Rung 2:1 – Based on the done bit from the ASCII Read Line instruction in run 0, move the string data into an integer file in the PLC-5 data table. Note: The Length variable in the Copy File instruction is set to 12. This value includes a leading word indicating string length, ten words of bar code data, and one word for the [CR] [LF] terminator. Figure 8 Sample PLC Ladder Listing. 3 August 1994 Page 1 Program Listing Report PLC–5/30 File 2_51F6_8 Rung 2:0 Rung 2:0 | R6:23 +ARL––––––––––––––––––––+ | +––]/[––––––––––––––––––––––––––––––––––––––––––+ASCII READ LINE +–(EN)–+ | DN |Channel 0| | | |Dest ST52:72+–(DN) | | |Control R6:23| | | |String Length 0+–(ER) | | |Characters Read 0| | | +–––––––––––––––––––––––+ | Rung 2:1 | R6:23 +COP–––––––––––––––+ | +––] [––––––––––––––––––––––––––––––––––––––––––––––––––––+COPY FILE +–+ | DN |Source #ST52:72| | | |Dest #N7:10| | | |Length 12| | | +––––––––––––––––––+ | Rung 2:2 | | +––––––––––––––––––––––––––––––––[END OF FILE]–––––––––––––––––––––––––––––––––+ | |

Refer to your PLC-5 Instruction Reference Manual for detailed information on using the PLC-5 programming software.

6

Page 7

Application Note Bulletin 2755 Bar Code Decoder to PLC-5/30/40/60

Running the Application

Refer to Figure 9 for an example of a bar code data string in the ASCII file, and to Figure 10 for an example of the resulting data table. Figure 9 PLC-5 ASCII File. STRING TEXT ADDRESS ST52:69

LEN 0

ST52:70

0

ST52:71

0

ST52:72

22

NO READ THIS LIGHTER^M^J

Press a function key or enter a value.

ST52:72 = Rem RUN

Forces: None

Data:Decimal

Change Radix F1

Edit String F3

Specify Address F5

Addr:Decimal 5/30 Addr 1 BAR_CODE Next File F7

Prev File F8

Figure 10 PLC-5 Data Table After Copy (“COP”) Instruction. ADDRESS N7:0 N7:10 N7:20 N7:30 N7:40 N7:50 N7:60 N7:70 N7:80 N7:90

0 1 2 3 4 5 6 7 8 9 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\16 N O R E A D T H I S L I G H T E R \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\00 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16 \00\16

Press a function key or enter a value.

N7:10 = RUN

Change Radix F1

Forces: None

Data:ASCII Specify Address F5

Addr:Decimal 5/30 Addr 1 BAR_CODE Next File F7

Prev File F8

7

Page 8

PLC and PLC-5 are registered trademarks of Allen-Bradley Co., Inc., a Rockwell International Company Windows is a trademark of Microsoft Procomm is a registered trademark of Datastorm Technologies, Inc.

Allen-Bradley has been helping its customers improve productivity and quality for 90 years. A-B designs, manufactures and supports a broad range of control and automation products worldwide. They include logic processors, power and motion control devices, man-machine interfaces and sensors. Allen-Bradley is a subsidiary of Rockwell International, one of the world’s leading technology companies.

With major offices worldwide. Algeria • Argentina • Australia • Austria • Bahrain • Belgium • Brazil • Bulgaria • Canada • Chile • China, PRC • Colombia • Costa Rica • Croatia • Cyprus • Czech Republic • Denmark • Ecuador • Egypt • El Salvador • Finland • France • Germany • Greece • Guatemala • Honduras • Hong Kong • Hungary • Iceland • India • Indonesia • Israel • Italy • Jamaica • Japan • Jordan • Korea • Kuwait • Lebanon • Malaysia • Mexico • New Zealand • Norway • Oman • Pakistan • Peru • Philippines • Poland • Portugal • Puerto Rico • Qatar • Romania • Russia–CIS • Saudi Arabia • Singapore • Slovakia • Slovenia • South Africa, Republic • Spain • Switzerland • Taiwan • Thailand • The Netherlands • Turkey • United Arab Emirates • United Kingdom • United States • Uruguay • Venezuela • Yugoslavia World Headquarters, Allen-Bradley, 1201 South Second Street, Milwaukee, WI 53204 USA, Tel: (1) 414 382-2000 Fax: (1) 414 382-4444

Publication 2755-2.51 – September 1994 Copyright 1994 Allen-Bradley Company, Inc. Printed in USA