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 24 of 41

AdaptaScan Bar Code Readers (Cat. Nos. 2755-SN3, -SN5, and -SN8) Application Guide: 11 - Communicating with a PLC-5 Processor on a DeviceNet Network, pages 201 to 207

Pages 201 to 207 of 354, from AdaptaScan Bar Code Readers (Cat. Nos. 2755-SN3, -SN5, and -SN8) Application Guide

The original document is the PDF (3.2 MB). 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 Accu-Sort 2755-SN3, Accu-Sort 2755-SN5, Allen-Bradley 2755-SN5, Accu-Sort 2755-SN8 and Allen-Bradley 2755-SN8

Page 201

Communicating with a PLC-5 Processor on a DeviceNet Network Overview

This application describes how to connect and configure an AdaptaScan Bar Code Reader to communicate with a PLC-5 processor over a DeviceNet network in a master/slave mode. A 4 character Interleaved 2 of 5 bar code symbol is used in this application. The DeviceNet network has the following nodes: • AdaptaScan Bar Code Reader on node 3 • 1771-SDN DeviceNet Scanner on node 1 • Computer running DeviceNet Manager Software on node 62 The DeviceNet terminal block in the reader’s wiring base connects the AdaptaScan Reader to the DeviceNet network. The wiring base has two DeviceNet terminal blocks; one for upstream connection and one for downstream connection.

Hardware Requirements

The hardware items required for this application are: • 2755-SN3, -SN5 or -SN8 AdaptaScan Bar Code Reader • 2755-NB40 or -NB41 Wiring Base • 2755-PW46 or -PW47 Power Supply • 2755-NC43 or -NC48 Configuration Cable • 1771-SDN Scanner Module (v3.04 firmware or later) • 1770-KFD DeviceNet RS-232 Interface • DeviceNet trunk cable • 1771 I/O chassis • PLC-5 processor • Computer running Windows 3.1 (or later) or Windows 95 • 9-to-25 Pin Adapter (for Computer with 25-pin COM port)

Software Requirements

The software requirements for this application are: • 2755-ASN AdaptaScan Offline Programming Software (v8.0 or later) • 6200 Series Programming Software • 1787-MGR DeviceNet Manager Software (v3.0 or later)

Publication 2755-6.8

Page 202

11–2

Communicating with a PLC-5 Processor on a DeviceNet Network

Related Publications

Related publications include: Publication

Description

2755-837

AdaptaScan Bar Code Readers User Manual

2755-838

AdaptaScan Software User Manual

1787-6.5.3

DeviceNet Manager Software Manual

1771-6.5.118

DeviceNet Scanner Configuration Manual

In addition, you may want to refer to the PLC-5 Hardware and Software User Manuals.

Connecting to the DeviceNet Network

The following illustration shows the three nodes of the DeviceNet master/slave network.

Computer 1770-KFD DeviceNet Interface Card

PLC-5 Processor 1771-SDN DeviceNet Scanner

Node 62

AdaptaScan Bar Code Reader

1787-MGR DeviceNet Manager Software 6200 Series Programming Software 2755-ASN AdaptaScan Software

Node 1 DeviceNet Trunk Cable

Connecting a Power Supply to the Reader

Node 3

DeviceNet Trunk Cable

The following illustration shows how to connect a 2755-PW46 or -PW47 power supply to a single bar code reader. Use a shielded cable (Belden 9316 recommended) to make the connections. Connect the shield to the ground screw on the reader’s wiring base. 2755-PW46 Power Supply

Reader 24V+

V-

Ground Screw on Wiring Base

Publication 2755-6.8

Page 203

Communicating with a PLC-5 Processor on a DeviceNet Network

PLC Ladder Logic

11–3

This section provides the PLC-5 ladder logic program and data monitor results. The ladder logic uses: • File N23 as the BTR file • File N22 ad the BTW file The data table shows file N23 after the AdaptaScan Reader successfully reads and transfers data ‘0300’ (from a 4 character, Interleaved 2 of 5 symbol) to the PLC-5 data table. File N23

N22

Location Word 0 Word 1 Word 0

Bit 15

Word 0

Bit 0

Word 1

Bit 7

Description Status word for SDN Scanner ‘New Message Being Sent’ bit from AdaptaScan Reader Status word 1=SDN Scanner in run mode 0=SDN Scanner in idle mode Idle mode is used to write the DeviceNet configuration to the SDN Scanner. ‘Send Message’ bit to AdaptaScan Reader

Message AddressingC Message Data is formatted the same as messages sent through the serial port. When setting up the DeviceNet scanner for addressing message data, use the following table. Description Number of Characters (LSB) Number of Characters (MSB) First Message Character (Beginning of Message) Other Message Characters from left to right Last Message Character (End of Message)

Word #

Byte #

➀➁

2 3

2

4 3

3+N where N is the number of characters in the message.

➀ Bytes #0 and #1 (word 1) are reserved for Discrete I/O. ➁ Poll Rx Size = 4 + (# of Characters in string).

Message data is addressed and sent to other DeviceNet devices through a DeviceNet scanner (Catalog No. 1771-SDN or 1747-SDN). To configure the scanner, you will need to provide the size of the message data, the beginning byte and bit number of the message and the destination of the message data.

Publication 2755-6.8

Page 204

11–4

Communicating with a PLC-5 Processor on a DeviceNet Network

Message Flow Control DeviceNet Input #8 and Output #16 control the transmission of bar code messages when using DeviceNet master-slave. Message flow control (handshaking) lets the controller know that data is available and that the reader does not send out messages faster than they can be received. Your controller logic program must transfer the message data and set the DeviceNet Input #8 (Send Next Data) for message flow control. New Data Is indicated by changing the state of DeviceNet Output #16 of the DeviceNet I/O. A change of state (0 to 1 or 1 to 0) indicates that a new message is being sent. Send Next Data Is indicated by changing the state of DeviceNet Input #8 of the DeviceNet I/O. A change of state (0 to 1 or 1 to 0) indicates that the controller is ready to receive the next message. Flow Control Example The following shows how DeviceNet Input #8 and Output #16 control the transmission of messages. Output #16 is changed by the reader and Input #8 is changed by the controller. DeviceNet Scan Number

Message Data

1 - Poll

-

1 - Response 2 - Poll 2 - Response 3 - Poll 3 - Response

Publication 2755-6.8

No Message Sent

DeviceNet Output #16 OFF (0)

Message 1 Sent

ON (1) ON (1)

Message 2 Sent

DeviceNet Input #8 OFF (0)

OFF (0) OFF (0)

Page 205

Communicating with a PLC-5 Processor on a DeviceNet Network

11–5

Note: The following ladder logic program is for reference only. Application specific interlocks may be necessary.

Note: If you are using channel B instead of channel A, bit 2 of word 0 needs to be set to 1.

Publication 2755-6.8

Page 206

11–6

Communicating with a PLC-5 Processor on a DeviceNet Network

Data Table File N23 Monitor In Data Table File N23: • N23:1 contains the DeviceNet status bits • Bit 15 is the control bit from the AdaptaScan Reader which toggles between 0 and 1 to indicate a ‘new message being sent’ • N23:2 is the byte count (4) of the message sent from the reader • N23:3 is the start the of the data read 3000. Data is actually 0300. All data is byte swapped. 1771-SDN to AdaptaScan Interface Data Table

Processor File :MASTER.ACH

Data Table File N23

Address

Data (Radix = ASCII)

N23:0

\00\00

\80\01

\00\04

3 0

0 0

\00\00

\00\00

\00\00

\00\00

\00\00

N23:10

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:20

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:30

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:40

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:50

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:60

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:70

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:80

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:90

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:100

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:110

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:120

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:130

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:140

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

N23:150

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

\00\00

Data Table File N22 Monitor Below is a partial listing of the Data Table File N22. The table shows N22:1 bit 7 as the DeviceNet status bit which toggles between 0 and 1 to indicate ‘send next message’. 1771-SDN to AdaptaScan Interface Data Table

Publication 2755-6.8

Processor File: MASTER.ACH

Address

Data (Radix=BINARY)

N22:0

0000000000000000

N22:1

0000000010000000

N22:2

0000000000000000

N22:3

0000000000000000

Data Table File N22

Page 207

Communicating with a PLC-5 Processor on a DeviceNet Network

Configuring the DeviceNet Scanner

11–7

This section describes how to configure the 1771-SDN Scanner using the DeviceNet Manager software. Before configuring the 1771-SDN Scanner, you must wire the DeviceNet network and apply DeviceNet Address of 3 to the AdaptaScan Bar Code Reader. See page 11–15. To configure the 1771-SDN DeviceNet Scanner: 1. Double-click the DeviceNet Manager icon. 2. Create a new project with the network name Network 1. 3. Click the Build Online button to create a DeviceNet network. The network should have the following nodes:

• Node 1 – 1771-SDN Scanner Module • Node 3 – 2755-SNx AdaptaScan Bar Code Reader • Node 62 – 1787-MGR DeviceNet Manager

Publication 2755-6.8