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

AdaptaScan Bar Code Readers (Cat. Nos. 2755-SN3, -SN5, and -SN8) Application Guide: 10 - Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging, pages 163 to 172

Pages 163 to 172 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 163

-

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging Overview

This application describes how to connect and configure an AdaptaScan Bar Code Reader to communicate with an SLC 5/03 processor over a DeviceNet network in a master/slave mode using explicit messaging. 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 (if not power by DeviceNet) • 2755-NC43 or -NC48 Configuration Cable • 1747-SDN Scanner Module (v2.05 firmware or later) • 1770-KFD DeviceNet RS-232 Interface • DeviceNet trunk cable • 1747 I/O chassis • SLC 5/03 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) • SLC Advanced Programming Software • 1787-MGR DeviceNet Manager Software (v3.0 or later)

Publication 2755-6.8

Page 164

10–2

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging

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

1747-6.5.2

1747-SDN DeviceNet Scanner Configuration Manual

In addition, you may want to refer to the SLC 500 Hardware and Software User Manuals.

Connecting to the DeviceNet Network

The following illustration shows the nodes of the DeviceNet master/slave network. Refer to the 1747-SDN DeviceNet Scanner Configuration Manual (Publication No. 1747-6.5.2) for more information regarding user termination information.

Computer 1770-KFD DeviceNet Interface Card

SLC 5/03 Processor 1747-SDN DeviceNet Scanner

Node 62

AdaptaScan Bar Code Reader

1787-MGR DeviceNet Manager Software SLC 500 Advanced 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

Note: Use a termination switch for DeviceNet in the wiring base for the end of the network.

Publication 2755-6.8

Page 165

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging

SLC Ladder Logic

10–3

This section provides the SLC ladder logic program and data monitor results. The ladder logic uses: • File N23 as the SLC interface to M1 file • File N22 as the SLC interface to M0 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 SLC data table. File

Location

Discrete Output O

Word 0 Bit 0

N23 N22

Word 0 Word 1 Bit 15 Word 0 Word 1 Bit 7

Description 1=SDN card in run mode 0=SDN card in idle mode Status word ‘New Message Being Sent’ bit from AdaptaScan Reader Status word ‘Send Message’ bit to AdaptaScan Reader

Message AddressingB 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 166

10–4

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging

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 167

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging

10–5

Note: The following ladder logic program is for reference only. Application specific interlocks may be necessary. Rung 2:0 This rung enables Discrete Output bit 0 of slot 1. This will put the 1747-SDN card into run mode. Remember in order to “save to sdn” from the DeviceNet Manager Software you must disable this bit or put the processor into program mode.

Publication 2755-6.8

Page 168

10–6

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging

N23 Data Table File 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. Note: The SLC instruction SWP can be used to swap the bar code data only. 1747-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

N22 Data Table File 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’. 1747-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 169

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging

10–7

Data Table File 0 Monitor Below is a partial listing of the File 0 data table. The table shows that bit O:1/0 is set to enable run mode in the 1747-SDN Scanner (1=RUN; 0=IDLE). 1747-SDN to AdaptaScan Interface Data Table Address

Processor File :MASTER.ACH

Data Table File O

Data (Radix = ASCII)

O:1

\00\01

O:1.1

\00\00

O:1.2

\00\00

O:1.3

\00\00

O:1.4

\00\00

O:1.5

\00\00

O:1.6

\00\00

O:1.7

\00\00

O:1.8

\00\00

O:1.9

\00\00

O:1.10

\00\00

O:1.11

\00\00

O:1.12

\00\00

O:1.13

\00\00

O:1.14

\00\00

O:1.15

\00\00

Data Table File M1 Monitor Below is a partial listing of the M1 data table. • M1:1.1 contains the DeviceNet status bit • M1:1.2 is the byte count (4) of a message • M1:1.3 to M1:1.4 is data 0300 from the AdaptaScan Reader 1747-SDN to AdaptaScan Interface Data Table Address

Processor File :MASTER.ACH

Data Table File M1:1

Data (Radix = ASCII)

M1:1

\00\00

M1:1.1

\80\01

M1:1.2

\00\04

M1:1.3

3 0

M1:1.4

0 0

M1:1.5

\00\00

M1:1.6

\00\00

M1:1.7

\00\00

M1:1.8

\00\00

M1:1.9

\00\00

M1:1.10

\00\00

M1:1.11

\00\00

M1:1.12

\00\00

M1:1.13

\00\00

M1:1.14

\00\00

M1O:1.15

\00\00

Publication 2755-6.8

Page 170

10–8

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging

Configuring the DeviceNet Scanner

This section describes how to configure the 1747-SDN Scanner using the DeviceNet Manager software. Before configuring the 1747-SDN Scanner, you must wire the DeviceNet network and apply DeviceNet Address 3 to the bar code reader. See page 10–16. To configure the 1747-SDN DeviceNet Scanner: 1. Double-click the DeviceNet Manager icon. 2. Create a new project with the network name SLC503. 3. Click the Build Online button to create a DeviceNet network. The network should have the following nodes:

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

Publication 2755-6.8

Page 171

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging

10–9

4. Double-click the 1747-SDN Scanner Module to open the 1747-SDN Module Configuration dialog. From this dialog, you modify all configuration parameters for the 1747-SDN Scanner.

If you are using an AdaptaScan with v7.0 (or lower) firmware on a network with 2 or less nodes, change the Interscan Delay parameter to 20 ms. This will allow the AdaptaScan more CPU time to process bar code data instead of responding to DeviceNet polls. 5. Click the Edit Scan List button.

Note: Version 8.0 of the AdaptaScan Offline Programming Software and firmware minimizes DeviceNet polling interruption of scanning.

Publication 2755-6.8

Page 172

10–10

Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging

6. Click the Edit I/O Parameters button.

7. Click the Polled button. 8. Change the Poll Rx size to 8. 9. Change the Poll Tx size to 1. 10. Click the OK button to return to the Scan List Editor screen. 11. Click the Datatable Map button.

Publication 2755-6.8