Allen-Bradley 2755--SN5, 2755-SN3, 2755-SN8 Application Manual
The Allen-Bradley 2755--SN5 is a bar code reader that can be used to read bar codes from a variety of surfaces. It is a powerful and versatile device that can be used in a variety of applications, including inventory control, shipping and receiving, and work-in-process tracking. The 2755--SN5 is easy to use and can be configured to meet the specific needs of your application.
Advertisement
Advertisement
Allen-Bradley
AdaptaScan
Bar Code
Readers
(Cat. Nos. 2755-SN3, -SN5, and
-SN8)
Application
Guide
Important User
Information
Because of the variety of uses for the products described in this publication, those responsible for the application and use of this control equipment must satisfy themselves that all necessary steps have been taken to assure that each application and use meets all performance and safety requirements, including any applicable laws, regulations, codes and standards.
The illustrations, charts, sample programs and layout examples shown in this guide are intended solely for purposes of example.
Since there are many variables and requirements associated with any particular installation, Allen-Bradley does not assume responsibility or liability (to include intellectual property liability) for actual use based upon the examples shown in this publication.
Allen-Bradley publication SGI-1.1, Safety Guidelines for the
Application, Installation, and Maintenance of Solid-State Control
(available from your local Allen-Bradley office), describes some important differences between solid-state equipment and electromechanical devices that should be taken into consideration when applying products such as those described in this publication.
Reproduction of the contents of this copyrighted publication, in whole or in part, without written permission of Allen-Bradley
Company, Inc., is prohibited.
Throughout this manual we use notes to make you aware of safety considerations:
!
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property damage or economic loss.
Attention statements help you to:
• identify a hazard
• avoid the hazard
• recognize the consequences
Important: Identifies information that is critical for successful application and understanding of the product.
PLC, PLC-5, and PHOTOSWITCH are registered trademarks of Allen-Bradley, Inc.
PanelView, PanelView 900, PanelBuilder, AdaptaScan, Data Highway Plus, SLC, SLC 500, SLC 5/03, and SLC 5/04 are trademarks of Allen-Bradley Company, Inc.
APS is a trademark of Rockwell Software, Inc.
DeviceNet is a trademark of the Open DeviceNet Vendor Association
Windows is a trademark of Microsoft
Preface
Contents of this Guide
Intended Audience
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Technical Support Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
P–2
P–4
P–4
P–4
Using the Auto-Load
Function
Using ASCII Command Input
Chapter 1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Internal Power Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to the Reader . . . . . . . . . . . . . . . . . . .
Configuring the Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define a Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address
Configure the Scanner
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Discrete Input Module . . . . . . . . . . . . . . . . . . . . .
Configure the Match Table
Configure a Package
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Auto-Load Trigger Source
Sending the Configuration to the Reader
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Running the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1–3
1–4
1–5
1–5
1–6
1–6
1–7
1–8
1–1
1–1
1–1
1–1
1–2
1–2
1–3
1–9
1–10
1–10
Chapter 2
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting a Computer to the Reader . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to the Reader . . . . . . . . . . . . . . . . . . .
Configuring the Reader
Create a New Project
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address
Configure the Scanner
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the ASCII Commands
Configure the Serial Port
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–3
2–3
2–4
2–5
2–5
2–6
2–6
2–8
2–1
2–1
2–1
2–1
2–2
2–2
Publication 2755-6.8
toc–ii Table of Contents
Downloading Match Codes from a Host Device
Downloading Match Codes via DH485 Protocol with an
SLC 5/03 or SLC 5/04
Controller
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader . . . . . . . . . . . . . . . . . . . .
Running the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2–10
2–11
2–12
2–12
Chapter 3
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting a Computer to the Reader . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to the Reader . . . . . . . . . . . . . . . . . . .
Configuring the Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring a Match Entry and I/O Indicator LED
Sending the Configuration to the Reader
. . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Finding Match Table Instances . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting the Computer to the RS-232 Port . . . . . . . . . . . . . . . . .
Downloading Match Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Convert the Bar Code String to Hex . . . . . . . . . . . . . . . . . . . . . .
Place the String in the Data Packet
Send Data to the Reader
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Response Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Downloading Other Host Commands . . . . . . . . . . . . . . . . . . . . . . .
3–8
3–9
3–10
3–10
3–11
3–11
3–11
3–12
3–14
3–15
3–3
3–4
3–5
3–5
3–6
3–7
3–1
3–1
3–1
3–1
3–2
3–2
3–3
Chapter 4
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to the Reader . . . . . . . . . . . . . . . . . . .
Connecting to the DH-485 Network . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Readers to SLC 5/03 Controller . . . . . . . . . . . . . . . .
Connecting Readers to SLC 5/04 Controller – 2 AIC Modules
Connecting Readers to SLC 5/04 Controller – 1 AIC Module
. . .
. . . .
Configuring Bar Code Reader 1
Create a New Project
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4–2
4–3
4–4
4–5
4–6
4–6
4–7
4–8
4–9
4–1
4–1
4–1
4–2
4–2
Publication 2755-6.8
Table of Contents toc–iii
Communicating with a
1746-BAS BASIC Module
Communicating with an SLC over an RS-232 Link
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Serial Port
Configure for Match Codes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure for a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure for an Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader . . . . . . . . . . . . . . . . . . . .
Finding Match Table Instances . . . . . . . . . . . . . . . . . . . . . . . . . . .
Downloading Match Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Convert the Bar Code String to Hex . . . . . . . . . . . . . . . . . . . . . .
Place the String in the Data Packet . . . . . . . . . . . . . . . . . . . . . .
4–17
4–17
4–17
Response Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the SLC Controller . . . . . . . . . . . . . . . . . . . . . . . . . . .
4–19
4–20
4–20 SLC 5/04 Configuration
SLC Ladder Logic
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Viewing Match Codes in Slave Mode via the Reader’s LEDs . . . .
4–21
4–21
Viewing Match Code Downloads in Slave Mode via Ladder Logic 4–22
Viewing Match Code Downloads in Master Mode via Ladder Logic 4–25
4–9
4–10
4–13
4–14
4–15
4–16
4–16
Chapter 5
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting a BASIC Module to the Reader . . . . . . . . . . . . . . . . . .
SLC Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Programming the BASIC Module . . . . . . . . . . . . . . . . . . . . . . . . . .
SLC BASIC Module Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader
Running the Application
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5–4
5–5
5–5
5–5
5–7
5–8
5–1
5–1
5–1
5–1
5–2
5–3
5–9
5–10
5–10
5–11
5–12
5–13
5–13
Chapter 6
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6–1
6–1
6–1
6–1
Publication 2755-6.8
toc–iv Table of Contents
Communicating with an SLC on a DH-485 Network
Connecting an SLC Controller to the Reader . . . . . . . . . . . . . . . . .
Configuring the SLC Controller
SLC Ladder Logic Program
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader
Running the Application
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6–7
6–7
6–8
6–9
6–10
6–11
6–11
6–2
6–2
6–3
6–4
6–4
6–5
6–6
Chapter 7
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to the Reader . . . . . . . . . . . . . . . . . . .
Connecting to the DH-485 Network . . . . . . . . . . . . . . . . . . . . . . . .
Connecting Readers to SLC 5/03 Controller . . . . . . . . . . . . . . . .
Connecting Readers to SLC 5/04 Controller – 2 AIC Modules . . .
Connecting Readers to SLC 5/04 Controller – 1 AIC Module . . . .
Configuring the SLC Controller
SLC 5/04 Configuration
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Bar Code Reader 1 . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to Reader 1 . . . . . . . . . . . . . . . . . . . . .
Configuring Bar Code Reader 2 . . . . . . . . . . . . . . . . . . . . . . . . . .
Add a Second Bar Code Reader to the Project . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label
Configure the Scanner
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Serial Port
Create a Message
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7–14
7–15
7–16
7–16
7–16
7–16
7–8
7–9
7–10
7–11
7–12
7–12
7–17
7–18
7–18
7–19
7–20
7–4
7–5
7–6
7–7
7–7
7–8
7–1
7–1
7–1
7–2
7–3
7–3
Publication 2755-6.8
Table of Contents toc–v
Communicating with a PLC-5 over an RS-232 or RS-422
Link
Chapter 8
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting the PLC-5 Processor to the Reader . . . . . . . . . . . . . . .
Cabling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the PLC Processor . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5 Ladder Logic Program
Configuring the Reader
Create a New Project
Define the Bar Code Label
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address
Configure the Scanner
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Serial Port
Create a Message
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader
Running the Application
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8–2
8–3
8–4
8–5
8–5
8–6
8–1
8–1
8–1
8–1
8–2
8–7
8–8
8–8
8–9
8–10
8–11
8–12
8–12
Communicating with an SLC
5/03 Processor on a
DeviceNet Network
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to Reader 2
Running the Application
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7–21
7–22
7–22
Chapter 9
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting to the DeviceNet Network . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to the Reader . . . . . . . . . . . . . . . . . . .
SLC Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Flow Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
N23 Data Table File Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . .
N22 Data Table File Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Table File 0 Monitor
Data Table File M1 Monitor
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the DeviceNet Scanner . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Reader
Create a New Project
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Change the Baud Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
9–2
9–3
9–3
9–4
9–6
9–6
9–1
9–1
9–1
9–2
9–2
9–7
9–7
9–8
9–13
9–13
9–14
9–15
9–16
Publication 2755-6.8
toc–vi Table of Contents
Communicating with an SLC
5/03 Processor on a
DeviceNet Network using
Explicit Messaging
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger
Create a Message
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader
Running the Application
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Troubleshooting the Module and Network . . . . . . . . . . . . . . . . . . .
9–16
9–17
9–17
9–19
9–19
9–19
9–20
Chapter 10
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting to the DeviceNet Network . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to the Reader . . . . . . . . . . . . . . . . . . .
SLC Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Addressing
Message Flow Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
N23 Data Table File Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . .
N22 Data Table File Monitor
Data Table File 0 Monitor
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Table File M1 Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the DeviceNet Scanner . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10–8
10–13
10–3
10–4
10–6
10–6
10–7
10–7
10–1
10–1
10–1
10–2
10–2
10–2
10–3
Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10–13
Change the Baud Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10–14
10–15
10–16 Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10–16
10–17
10–17
Define the Message Format
Configure for Match Codes
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure for a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10–19
10–20
10–22
Configure for an Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader . . . . . . . . . . . . . . . . . . . .
Running the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10–23
10–23
10–23
Explicit Message Program Control . . . . . . . . . . . . . . . . . . . . . . . .
Explicit Message Program Control Feature . . . . . . . . . . . . . . . .
10–24
10–25
Formatting the Explicit Message Transaction Block . . . . . . . . . . . 10–26
Processor and Scanner Module Manage Messages
Explicit Message Program Control Limitations
. . . . . . . . . .
. . . . . . . . . . . . . .
Explicit Messaging Ladder Logic Program . . . . . . . . . . . . . . . . .
10–28
10–29
10–31
Example Data Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Notes on using Explicit Messaging . . . . . . . . . . . . . . . . . . . . . .
10–31
10–32
Publication 2755-6.8
Table of Contents toc–vii
Troubleshooting the Module and Network . . . . . . . . . . . . . . . . . . .
Downloading Other Host Commands . . . . . . . . . . . . . . . . . . . . . . .
10–33
10–36
Communicating with a PLC-5
Processor on a DeviceNet
Network
Chapter 11
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting to the DeviceNet Network . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to the Reader . . . . . . . . . . . . . . . . . . .
PLC Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Flow Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Table File N23 Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Table File N22 Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the DeviceNet Scanner . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Change the Baud Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address
Configure the Scanner
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger
Create a Message
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader . . . . . . . . . . . . . . . . . . . .
Running the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Troubleshooting Your Module . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11–7
11–12
11–12
11–13
11–14
11–15
11–15
11–16
11–16
11–18
11–18
11–18
11–19
11–2
11–3
11–3
11–4
11–6
11–6
11–1
11–1
11–1
11–2
11–2
Communicating with a PLC-5
Processor on a DeviceNet
Network using Explicit
Messaging
Chapter 12
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements
Software Requirements
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting to the DeviceNet Network . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to the Reader . . . . . . . . . . . . . . . . . . .
PLC Ladder Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Message Flow Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Table File N23 Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . .
Data Table File N22 Monitor
Configuring the DeviceNet Scanner
Configuring the Reader
Create a New Project
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Change the Baud Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12–3
12–3
12–4
12–6
12–6
12–7
12–12
12–12
12–13
12–1
12–1
12–1
12–2
12–2
12–2
Publication 2755-6.8
toc–viii Table of Contents
Communicating with a
2760-RB Module over an
RS-232 Link
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address
Configure the Scanner
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
12–14
12–15
12–15
12–16
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader . . . . . . . . . . . . . . . . . . . .
12–16
12–18
12–18
Running the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Explicit Message Program Control . . . . . . . . . . . . . . . . . . . . . . . .
Explicit Message Program Control Feature . . . . . . . . . . . . . . . .
12–18
12–19
12–20
Formatting the Explicit Message Transaction Block . . . . . . . . . . .
How the Processor and Scanner Module Manage Messages . . . .
12–21
12–23
Explicit Message Program Control Limitations . . . . . . . . . . . . . .
Explicit Messaging Ladder Logic Program
Example Data Tables
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Notes on using Explicit Messaging . . . . . . . . . . . . . . . . . . . . . .
12–24
12–26
12–26
12–27
Troubleshooting Your Module . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Downloading Other Host Commands . . . . . . . . . . . . . . . . . . . . . . .
12–28
12–31
Chapter 13
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5 Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting the RB Module to the Reader . . . . . . . . . . . . . . . . . . .
Classic PLC-5 Processor DIP Switches . . . . . . . . . . . . . . . . . . .
Enhanced PLC-5 Processor DIP Switches . . . . . . . . . . . . . . . . .
I/O Chassis Backplane DIP Switches . . . . . . . . . . . . . . . . . . . . .
2760-RB Module DIP Switches . . . . . . . . . . . . . . . . . . . . . . . . .
Cabling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13–3
13–3
13–3
13–3
Configuring the PLC-5 Processor . . . . . . . . . . . . . . . . . . . . . . . . .
Using the 2760-RB Module, Revision H or Above, with the New
Generation PLC-5 Processor . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the 2760-RB Interface Module . . . . . . . . . . . . . . . . . . .
13–5
13–6
13–7
13–7
Configuring the Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
13–10
13–10
13–11
13–12
13–1
13–1
13–1
13–2
13–2
13–2
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13–13
13–13
13–14
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader . . . . . . . . . . . . . . . . . . . .
13–15
13–16
Publication 2755-6.8
Table of Contents toc–ix
Communicating with a
2760-RB Module on a DH-485
Network
Chapter 14
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5 Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting the RB Module to the Reader
Classic PLC-5 Processor DIP Switches
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
Enhanced PLC-5 Processor DIP Switches . . . . . . . . . . . . . . . . .
I/O Chassis Backplane DIP Switches . . . . . . . . . . . . . . . . . . . . .
2760-RB Module DIP Switches
Cabling
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the PLC-5 Processor . . . . . . . . . . . . . . . . . . . . . . . . .
Using the 2760-RB Module, Revision H or Above, with the New
Generation PLC-5 Processor . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the 2760-RB Interface Module
Configuring the Bar Code Reader
Create a New Project
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14–3
14–4
14–5
14–6
14–6
14–8
14–8
14–9
14–10
14–11
Configure the Decoder Trigger
Configure the Serial Port
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14–12
14–12
14–14
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader . . . . . . . . . . . . . . . . . . . .
14–15
14–15
14–1
14–1
14–1
14–1
14–2
14–2
14–2
14–3
14–3
Downloading Match Codes via DH485 using a PLC-5
Processor and a 2760-RB
Module
Chapter 15
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirements
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PLC-5 Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting the RB Module to the Reader
Classic PLC-5 Processor DIP Switches
Enhanced PLC-5 Processor DIP Switches
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
I/O Chassis Backplane DIP Switches . . . . . . . . . . . . . . . . . . . . .
2760-RB Module DIP Switches . . . . . . . . . . . . . . . . . . . . . . . . .
Cabling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the PLC-5 Processor . . . . . . . . . . . . . . . . . . . . . . . . .
Using the 2760-RB Module, Revision H or Above, with the New
Generation PLC-5 Processor . . . . . . . . . . . . . . . . . . . . . . . .
Configuring the 2760-RB Interface Module . . . . . . . . . . . . . . . . . . .
Configuring the Bar Code Reader
Create a New Project
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15–2
15–2
15–3
15–3
15–3
15–4
15–5
15–1
15–1
15–1
15–1
15–2
15–6
15–6
15–8
15–8
Publication 2755-6.8
toc–x Table of Contents
Communicating with
AdaptaScan Bar Code
Readers via DeviceNet
Peer-to-Peer Protocol
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address
Configure the Scanner
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
15–9
15–10
15–10
15–11
Configure the Serial Port
Configure for Match Codes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure for a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15–12
15–13
15–14
Configure for an Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configuration to the Reader . . . . . . . . . . . . . . . . . . . .
Downloading Match Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15–15
15–15
15–16
PLC Command Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Convert the Bar Code String to Hex . . . . . . . . . . . . . . . . . . . . . .
15–16
15–16
Place the String in the Data Packet . . . . . . . . . . . . . . . . . . . . . .
Match Code String in Block Transfer Write
Response Codes
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15–17
15–17
15–18
Chapter 16
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software Requirement
Related Publications
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Connecting to the DeviceNet Network . . . . . . . . . . . . . . . . . . . . . .
Connecting a Power Supply to a Reader . . . . . . . . . . . . . . . . . . . .
Multiple Reader Connections using Other Power Supply . . . . . . .
Configuring Bar Code Reader 1 . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Bar Code Label . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Serial Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Bar Code Reader 2 . . . . . . . . . . . . . . . . . . . . . . . . . .
16–7
16–8
16–8
16–9
16–10
16–11
16–1
16–1
16–1
16–1
16–2
16–2
16–3
16–4
16–4
16–5
16–6
Select Bar Code Reader 2 in the Project
Define the DeviceNet Address
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16–11
16–11
16–12
Configure the Decoder Trigger
Create a Message
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
16–12
16–13
16–14
Configuring Bar Code Reader 3 . . . . . . . . . . . . . . . . . . . . . . . . . .
Selecting Bar Code Reader 3 in the Project . . . . . . . . . . . . . . . .
Define the DeviceNet Address . . . . . . . . . . . . . . . . . . . . . . . . .
16–15
16–15
16–15
Configure the Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configure the Decoder Trigger . . . . . . . . . . . . . . . . . . . . . . . . .
16–16
16–16
Publication 2755-6.8
Communicating with
PanelView 900 Terminals on a DeviceNet Network
Table of Contents toc–xi
Create a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define the Message Format . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sending the Configurations to the Readers . . . . . . . . . . . . . . . . . .
Running the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16–17
16–18
16–19
16–19
Chapter 17
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hardware Requirements
Software Requirements
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DeviceNet PanelView Terminals
Typical DeviceNet Network
. . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Making DeviceNet Connections . . . . . . . . . . . . . . . . . . . . . . . . . .
Making Serial Port Connections . . . . . . . . . . . . . . . . . . . . . . . . . .
Modifying DeviceNet Settings from the Terminal
Setting up Communications using PanelBuilder
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
Selecting a DeviceNet PanelView Terminal
Configuring DeviceNet Communications
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
PanelView Message Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17–5
17–6
17–8
17–8
17–9
17–11
Server Explicit and I/O Slave Messaging
Client Explicit Messaging
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PanelView Tag Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17–11
17–12
17–14
17–1
17–1
17–1
17–2
17–2
17–3
17–4
Using the Electronic Data Sheet . . . . . . . . . . . . . . . . . . . . . . . . . .
Downloading Applications over a Serial Link . . . . . . . . . . . . . . . . .
17–17
17–18
Downloading Application using the Internal DF1 Driver
DeviceNet Application Report
. . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
17–18
17–19
Error Messages and Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PanelBuilder Tag Error Messages . . . . . . . . . . . . . . . . . . . . . . .
17–19
17–19
PanelBuilder Device Error Messages . . . . . . . . . . . . . . . . . . . . .
PanelBuilder Translation Error Messages . . . . . . . . . . . . . . . . . .
Electronic Data Sheet (EDS) File Error Messages
Communication Status Error Messages
. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
17–20
17–20
17–21
17–22
Alert Messages
Fault Messages
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17–23
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17–24
AdaptaScan Application
Connections
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
PanelView Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17–25
17–25
17–26
Read Bar Code Data Tag Configuration . . . . . . . . . . . . . . . . . . .
Read Package Counter Tag Configuration . . . . . . . . . . . . . . . . .
Write Package Count Reset . . . . . . . . . . . . . . . . . . . . . . . . . . .
17–27
17–28
17–29
AdaptaScan Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Making Bar Code Data Available . . . . . . . . . . . . . . . . . . . . . . . .
Making Package Counter Data Available . . . . . . . . . . . . . . . . . .
17–30
17–30
17–31
Publication 2755-6.8
This guide describes a variety of applications in which the
AdaptaScan Bar Code Reader is used. Each chapter covers a separate application and provides:
• overview of the application
• hardware requirements
• software requirements
Each application shows how to:
• connect the AdaptaScan Reader to a network or host device
• configure the AdaptaScan Bar Code Reader
• configure the controller, providing the necessary ladder logic (if required)
Because of the variety of uses for the information, the user of and those responsible for applying this information must satisfy themselves as to the acceptability of each application and use of the program. In no event will Allen-Bradley Company be responsible or liable for indirect or consequential damages resulting from the use of application of this information.
The examples shown in this document are intended solely to illustrate the principles of the bar code reader and some of the methods used to apply them. Particularly because of the many requirements associated with any particular installation,
Allen-Bradley Company cannot assume responsibility or liability for actual use based upon the illustrative uses and applications.
Publication 2755-6.8
P–2 Preface
Contents of this Guide The following table describes the contents of this manual.
Chapter
1
2
3
4
5
6
7
8
9
10
11
Preface
Using the Auto-Load
Function
Using ASCII Command
Input
Title
Downloading Match
Codes from a Host Device
Contents
Describes the purpose, background, and scope of this guide. Also specifies the audience for whom this guide is intended.
Describes how to configure the reader to autoload data into the match code table.
Shows how to configure the reader to start/stop scanning when receiving ASCII commands from a terminal emulator and then display the bar code data on the emulator.
Shows how to download match codes (and other host commands) from a terminal emulator to the reader.
Downloading Match
Codes via DH485
Protocol with an
SLC 5/03 t
or
SLC 5/04 t
Controller
Communicating with a
1746-BAS BASIC Module
Communicating with an
SLC t
over an RS-232
Link
Communicating with an
SLC on a DH-485
Network
Communicating with an
PLC-5
R
over an RS-232 or RS-422 Link
Communicating with an
SLC 5/03 Processor on a
DeviceNet t
Network
Communicating with an
SLC 5/03 Processor on a
DeviceNet Network using
Explicit Messaging
Communicating with a
PLC-5 Processor on a
DeviceNet Network
Shows how to download match codes from an
SLC 5/03 or SLC 5/04 controller to the reader.
Describes how to configure the reader to communicate with a 1746-BAS BASIC module.
Describes how to configure the reader to communicate with an SLC controller over an
RS-232 serial connection.
Tells how to configure two readers to communicate with an SLC controller over a DH-485 network using master mode.
Describes how to configure the reader to communicate with an PLC controller using either
RS-232 or RS-422 communication.
Shows how to configure a reader to communicate with an SLC controller over a DeviceNet network in master/slave mode.
Shows how to configure a reader to communicate with an SLC controller over a DeviceNet network in master/slave mode using explicit messaging.
Shows how to configure a reader to communicate with a PLC-5 controller over a DeviceNet network in master/slave mode.
Table continued on the next page.
Publication 2755-6.8
Preface P–3
Chapter
12
13
14
15
16
17
Title
Communicating with a
PLC-5 Processor on a
DeviceNet Network using
Explicit Messaging
Communicating with a
2760-RB Module over an
RS-232 Link
Communicating with a
2760-RB Module on a
DH-485 Network
Downloading Match
Codes via DH485 using a
PLC-5 Processor and a
2760-RB Module
Communicating with
AdaptaScan Bar Code
Readers via DeviceNet
Peer-to-Peer Protocol
Communicating with
PanelView 900
Terminals on a DeviceNet
Network
Contents
Shows how to configure a reader to communicate with a PLC-5 controller over a DeviceNet network in master/slave mode using explicit messaging.
Describes how to configure the reader to communicate with a 2760-RB module using
RS-232 communication.
Describes how to configure the reader to communicate with a 2760-RB module using
DH-485 communication.
Describes how to configure the reader to communicate with a PLC-5 processor via DH485 protocol, using a 2760-RB module.
Describes how to configure three readers to communicate with each other over a DeviceNet network via peer-to-peer protocol.
Describes how to configure the reader to communicate with the DeviceNet versions of the
PanelView 900 terminals.
Publication 2755-6.8
P–4 Preface
Intended Audience This application guide assumes that you understand how to:
• configure and operate the AdaptaScan Bar Code Reader using the
AdaptaScan Software.
• program and operate the logic controller that will communicate with the reader
• configure the appropriate network communications
Related Publications
Publications that relate to the AdaptaScan Bar Code Readers and other Allen-Bradley products used with the readers are:
Publication
Number
2755-837
2755-838
1485-6.7.1
1770-6.2.2
1787-6.5.3
1749-6.5.5
1747-6.5.2
1771-6.5.118
Description
AdaptaScan Bar Code Reader User Manual
AdaptaScan Software User Manual
DeviceNet Cable System Planning and Installation Manual
Data Highway / Data Highway Plus / Data Highway-485 Cable
Installation Manual
DeviceNet Manager Software (Catalog No. 1787-MGR) User
Manual
DeviceNet Adapter Module (Catalog No. 1749-ADN) User Manual
DeviceNet Scanner (Catalog No. 1747-SDN) Configuration Manual
DeviceNet Scanner (Catalog No. 1771-SDN) Configuration Manual
Each chapter refers to additional publications that relate to a specific application.
Technical Support Services
If you have any questions about the AdaptaScan Bar Code Reader, please consult this application guide first. If you can’t find the answer, contact Rockwell Automation International Support:
Rockwell Automation
Technical Support
6680 Beta Drive
Mayfield Village, Ohio 36849
Inside USA and Canada, call 1–800–289–2279.
Outside USA and Canada, contact your Allen-Bradley office or call
USA (216) 646–6800.
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Related Publications
Using the AutoĆLoad Function
This application describes how to set up the AdaptaScan Bar Code
Reader to use the Auto-Load function. The application uses a
PHOTOSWITCH
R
(Catalog No. 42SRU-6203) as a package detector to trigger the decoder and a discrete input to activate the
Auto-Load.
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
•
PHOTOSWITCH 42SRU-6203
•
2755-IB5S DC Input Module
•
Computer running Windows t
3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for computers with a 25-pin COM port)
The software requirements for this application is the 2755-ASN
AdaptaScan Offline Programming Software.
Publications you may want to refer to include:
Publication
2755-837
2755-838
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
Publication 2755-6.8
1–2 Using the Auto-Load Function
Internal Power Source The following illustration shows the wiring base connections. The
2755-IB5S DC input module and the 42SRU-6203 PHOTOSWITCH receive power from the Package Detect +12V internal power source in this application. You could also use an external AC or DC power source. Refer to the AdaptaScan Bar Code Readers User Manual
(Publication No. 2755-837) for more information regarding using an external power source.
2755-IB5S
To +
To -
External
Input Contacts
To +12V
To
GND
Connecting a Power
Supply to the Reader
The circuit must not draw more than 50mA from the Package Detect terminal block.
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
24V+
Reader
V-
Ground Screw on Wiring Base
Publication 2755-6.8
Configuring the Reader
Using the Auto-Load Function 1–3
This section shows how to configure the AdaptaScan Reader using the AdaptaScan software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• configure a bar code label and symbol
• define a DeviceNet address
• configure the scanner
• configure the decoder trigger
• configure the discrete input module
• configure the match table, package and autoload trigger source
Create a New Project
1. Select New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
3. Choose Edit from the Project menu to rename the project
AutoLoad.
4. Click Save to save the project under the new name and then click
Close to return to the Project dialog.
Publication 2755-6.8
1–4 Using the Auto-Load Function
Define a Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to add a label.
3. Click the New button to add a symbol.
4. Select the symbology and define attributes such as Identifier and
Lengths.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save to save the new label setup.
7. Click Close to return to the main Project dialog.
Publication 2755-6.8
Using the Auto-Load Function
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
1–5
2. Select a DeviceNet address.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button to send the DeviceNet address to the reader.
5. Click Save and Close to return to the main Project dialog.
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button to return to the main Project dialog.
Publication 2755-6.8
1–6 Using the Auto-Load Function
Configure the Decoder
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Package Detect from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Configure the Discrete Input Module
The application uses a discrete input module to trigger the
Auto-Load function. The following procedure defines one of the two input/output modules available in the AdaptaScan Bar Code
Reader as an input.
1. Click the Input/Output button on the main Project dialog.
2. Under Inputs & Outputs, select Discrete Input/Output 2. This is the location of the 2755-IB5S DC Input Module in the reader’s wiring base.
3. Under Use As, select Input.
Publication 2755-6.8
4. Click the Save button.
5. Click the Close button to return to the main Project dialog.
Using the Auto-Load Function 1–7
Configure the Match Table
The following procedure defines the contents of the match table and the source of the symbol to be matched.
1. Click the Match Table button on the main Project dialog.
2. Click the New button to open the Match Function dialog.
3. Select the following parameters for the Match Function:
•
Under Function, select Auto-Load
•
Under Symbol Source, select Bar Code Reader 1
•
Under Bar Code Labels & Symbols, select Symbol 1 under
Label 1
•
Check (enable) the Match Exactly check box
4. Click the OK button to return to the Match Table dialog.
Publication 2755-6.8
1–8 Using the Auto-Load Function
Configure a Package
When the application is running, the I/O 1 LED energizes (no output module is actually installed in wiring base) when a No-Match or
No-Read occurs. The following procedure defines this package function.
1. From the Match Table dialog, click the Package button to open the Packages dialog.
2. Click the New button to create a package.
3. Under Mode, select No-Read or No-Match.
4. Select Match 1 under Match Functions.
Publication 2755-6.8
5. Click OK to return to the Packages dialog.
Using the Auto-Load Function 1–9
6. Click the Output To button to open the Package Outputs dialog.
7. Under Available Outputs, select Discrete Input/Output 1.
8. Click the Add>> button to add this selection under Output To:
Note: Discrete Input/Output 2 does not appear as an Available
Output because it was previously defined as an input.
9. Click OK until you return to the Match Table dialog.
Configure the Auto-Load Trigger Source
The application uses a discrete input module (Discrete Input/Output
2) to activate the Auto-Load function. The following procedure shows how to configure the input which will activate Auto-Load.
1. Click the AutoLoad button from the Match Table dialog.
2. Under Auto-Load Trigger:
• check the Enable check box.
• select Bar Code Reader 1 from the Device list.
• select Discrete Input/Output 2 from the Input list.
3. Click OK to return to the Match Table dialog.
4. Click Save and then Close to return to the Project dialog.
Publication 2755-6.8
1–10 Using the Auto-Load Function
Sending the Configuration to the Reader
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Use the Monitor dialog to verify bar code labels as they are decoded.
Running the Application
When the application is running, bar code data is autoloaded by triggering the decoder (with Package Detect) when the desired symbol is scanned and decoded. If the bar code data is unreadable or does not match the autoloaded match string, I/O LED 1 turns on.
The following illustration shows the auto-load sequence using a
Package Detect as a decoder trigger.
Package Detect
Auto-Load Trigger remains on until
Package Detect is turned off
Auto-Load Trigger
Auto-Load trigger prior to
Package Detect
For more information on using Auto-Load, refer to chapter 10 in the
AdaptaScan Software User Manual (Publication No. 2755-838).
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Related Publications
Using ASCII Command Input
This application describes how to configure an AdaptaScan Bar
Code Reader to receive ASCII commands from a terminal emulator over an RS-232 link:
•
Terminal Emulator in Windows 3.1
•
HyperTerminal in Windows 95
One character ASCII commands trigger the reader to start/stop scanning. For each trigger command the reader receives, it echoes a bar code string on the emulator.
The application includes the necessary cable diagrams and configuration information for the AdaptaScan Bar Code Reader.
The hardware items required for this application are:
•
2755-SN3, -SN5 or -SN8 AdaptaScan Bar Code Reader
•
2755-NB40 or -NB41 Wiring Base
•
2755-NC43 or -NC48 Configuration Cable
•
2755-PW46 or -PW47 Power Supply
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for computers with a 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
•
Terminal Emulator in Windows 3.1 or HyperTerminal in
Windows 95
Publications you may want to refer to include:
Publication
2755-837
2755-838
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
Publication 2755-6.8
2–2 Using ASCII Command Input
Connecting a Computer to the Reader
The following illustration shows the wiring base connections between the AdaptaScan Bar Code Reader and the personal computer. This RS-232 serial connection is used to download ASCII commands to the reader and to display bar code messages on the terminal emulator.
Create a cable using Belden 8303 (or equivalent) and a connector (to match your computer’s RS-232 port). The other end of the cable is wired to the RS-232 port in the reader wiring base.
Use Belden 8303 (or equivalent)
To Computer
RX
GND
TX
To Connector Compatible with Your Computer RS-232 Port
Wiring Base of Reader
Connecting a Power
Supply to the Reader
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
Configuring the Reader
Using ASCII Command Input 2–3
This section shows how to configure the AdaptaScan Reader using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• configure a bar code label and symbol
• define a DeviceNet address
• configure the scanner
• configure the decoder trigger for ASCII Command Input
• configure one character ASCII commands to start/stop scanning
• configure the serial port for terminal emulation
• define the format and content of messages
Create a New Project
Create a new project named ASCII Command Input for one
AdaptaScan Bar Code Reader (Bar Code Reader 1).
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
3. Choose Edit from the Project menu to rename the project ASCII
Command Input.
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Publication 2755-6.8
2–4 Using ASCII Command Input
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
4. Select the symbology and define attributes such as Identifier and
Lengths.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
Using ASCII Command Input
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2–5
2. Select a DeviceNet address.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Publication 2755-6.8
2–6 Using ASCII Command Input
Configure the Decoder Trigger
This section defines ASCII Command Input 1 as the trigger for the reader’s decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select ASCII Command Input 1 from the
Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Configure the ASCII Commands
The following procedure defines the ASCII commands that will trigger the decoder to start/stop scanning.
1. Click the Input/Output button on the main Project dialog.
2. Under Inputs & Outputs, select ASCII Command Input 1.
Publication 2755-6.8
Using ASCII Command Input 2–7
3. Click the Edit button to open the ASCII Command Input dialog.
The default ASCII commands for triggering the decoder are two character commands:
•
BS (Begin Scan)
•
ES (End Scan)
This application uses one character ASCII commands to trigger the decoder.
•
B (Begin Scan)
•
E (End Scan)
4. In the Turn On field, type the letter B. (The command is case sensitive.)
5. In the Turn Off field, type the letter E. If you do not use an E in the Turn Off field, the trigger will then turn off in 1000 ms. (The command is case sensitive.)
6. Click the OK button.
7. Click the Save button to save the ASCII command definitions.
8. Click the Close button and return to the main Project dialog.
Publication 2755-6.8
2–8 Using ASCII Command Input
Configure the Serial Port
This section configures the RS-232 serial port so that it is compatible with the Terminal Emulator in Windows 3.1 or HyperTerminal in
Windows 95.
1. Click the Serial Port button on the main Project dialog.
2. Verify that Terminal is selected in the Protocol list box.
3. In the Maximum Length field, type 1.
With the Maximum Length set to 1, only one character is downloaded to the reader through the terminal via RS-232 port.
If a message is configured, all bar code strings are read and uploaded to the terminal via RS-232 port.
If the Maximum Length is set to 2, only two characters are downloaded to the reader through the terminal via RS-232 port.
However, if a message is configured, only 2 bar code data characters are uploaded to the terminal. The same is true for a setting 3.
4. Select RS232 from the Connection list box.
Publication 2755-6.8
Using ASCII Command Input
5. Click the Edit button under Protocol.
6. Under Flow Control, select None.
2–9
7. Click OK to close the dialog.
8. Click the Save button to save the serial configuration.
9. Click Close to return to the main Project dialog.
Publication 2755-6.8
2–10 Using ASCII Command Input
Create a Message
This section defines the content of the message sent from the reader to the terminal emulator.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to define a message field.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Labels & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
9. Click the Edit button to open the Message Field Edit dialog.
Publication 2755-6.8
Using ASCII Command Input 2–11
10. Under Replacement Strings, type nr in the Fail: field.
Bar code data is sent to the emulator on a valid read. The Fail string sends the characters “nr” when a no read occurs.
11. Click OK to return to the Message Field dialog.
12. Click OK to return to the Message dialog.
Define the Message Format
This section defines the format of the message to display on the terminal emulator.
1. Click the Format button from the Message dialog.
2. In the Trailer field, type \r\n (Carriage Return, Line Feed).
3. Under Message Destination, select Serial Port.
4. Click OK to return to the Message dialog.
5. Click the Save button and then the Close button to return to the
Project dialog.
Publication 2755-6.8
2–12 Using ASCII Command Input
Sending the Configuration to the Reader
Running the Application
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
If your computer does not have two serial ports, switch the
2755-NC43 or -NC48 cable to the serial cable already wired to the
AdaptaScan Reader’s wiring base.
In the following illustration:
•
ASCII command B is entered to trigger the decoder to start scanning.
•
ASCII command E is entered to stop scanning. A timeout occurs if an E is not entered.
•
Bar code data is displayed on the terminal emulator.
You must type B to trigger the decoder again and display the next bar code string on the emulator.
Terminal Emulator Example
B
E
12345678
B
E abcdefg
B
E
12345678
ASCII Turn On command
ASCII Turn Off command
Bar code data from AdaptaScan Reader
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Related Publications
Downloading Match Codes from a Host Device
This application describes how to download match codes to the bar code reader from a terminal emulator using an RS-232 connection.
It also describes how to download other host commands using the same procedures.
The hardware items required for this application are:
•
2755-SN3, -SN5, -SN8 AdaptaScan Bar Code Reader
•
2755-NB40 or -NB41 Wiring Base
•
2755-PW46 or -PW47 Power Supply
•
2755-NC43 or -NC48 Configuration Cable
•
Communication Cable with Connector for PC
(Belden 8303 or equivalent)
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for Computer with 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
•
Terminal Emulator in Windows 3.1 or HyperTerminal in
Windows 95
Related publications include:
Publication
2755-837
2755-838
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
Publication 2755-6.8
3–2 Downloading Match Codes from a Host Device
Connecting a Computer to the Reader
The following illustration shows the wiring base connections between the AdaptaScan Bar Code Reader and the personal computer. This RS-232 serial connection is used to download match codes to the reader from a terminal emulator. Do not connect the cable to the computer until after the application is downloaded to the reader (see page 3–10).
Create a cable using Belden 8303 (or equivalent) and a connector (to match your computer’s RS-232 port). The other end of the cable is wired to the RS-232 port in the reader wiring base.
Use Belden 8303 (or equivalent)
To Computer
To Connector Compatible with Your Computer RS-232 Port
RX
GND
Tx
Wiring Base of Reader
Connecting a Power
Supply to the Reader
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-
DeviceNet Connector
Ground Screw on Wiring Base
Verify the connection by applying power to the wiring base and observing the polarity LED. The LED should be green. If the LED is red, the polarity needs to be reversed. Disconnect power from wiring base until the reader is installed.
Publication 2755-6.8
Configuring the Reader
Downloading Match Codes from a Host Device 3–3
This section shows how to configure one the AdaptaScan Bar Code
Readers using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• define the DeviceNet node address of the AdaptaScan Reader
• configure a bar code label and symbol
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the format of messages and the message destination
The steps may vary for some procedures because of the different requirements of applications. For example, the bar code labels may vary from one application to the next.
Create a New Project
This section adds a bar code reader to a new project and then renames the project Download Match Codes.
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
3. Choose Edit from the Project menu to rename the project
Download Match Codes.
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Publication 2755-6.8
3–4 Downloading Match Codes from a Host Device
Define the Bar Code Label
This section configures the reader to scan/decode Interleaved 2 of 5 symbols.
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define Symbol 1.
4. From the Symbology list box, select I 2 of 5.
To edit parameters of the selected symbology, click the
Symbologies button.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
Downloading Match Codes from a Host Device
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
3–5
2. Select a DeviceNet address.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the
Reader.
4. Click the Apply button.
5. Click the Close button and return to the Project dialog.
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Publication 2755-6.8
3–6 Downloading Match Codes from a Host Device
Configure the Decoder Trigger
Bar Code Reader 1 is triggered by a Timer. The Timer is typically used during initial setup to simulate a package detector.
The Timer is set for a specified On Time (1 second) and Off Time (1 second).
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button and the Close to return to the main Project dialog.
Publication 2755-6.8
Downloading Match Codes from a Host Device 3–7
Configure the Serial Port
Configure the parameters of the serial port to match the host device.
1. Click the Serial Port button from the main Project dialog.
2. Under Protocol, select:
• select Terminal
• check (enable) the Scanner Protocol check box
Scanner Protocol is used when a host (e.g., PLC or computer) is connected to a serial port in the reader’s wiring base.
3. From the Connection list box, select RS232.
4. Click the Edit button to configure the parameters for Terminal protocol.
5. In the Trailer text box, type \r\n (inserts carriage return and line feed).
6. Check (enable) the Hex Conversion check box.
7. Click OK to return to the Serial Port dialog.
8. Click Save and then the Close button to return to the Project dialog.
Publication 2755-6.8
3–8 Downloading Match Codes from a Host Device
Configuring a Match Entry and I/O Indicator LED
The application turns on output 1 when a symbol is read. This provides a convenient method of determining whether or not the reader is decoding a label. The discrete output is turned on by the match table.
1. Click the Match Table button on the main Project dialog.
Publication 2755-6.8
2. Click the New button to open the Match Function dialog.
3. Under Function, select Match Entry from the list box.
Match Entry specifies that a match occurs whenever decoded bar code data matches the Rule: entry.
4. Under Symbol Source, select Bar Code Reader 1.
5. Under Bar Code Labels & Symbols, select Symbol 1.
6. Check (enable) the Match Exactly check box.
Match Exactly specifies that ASCII characters are matched instead of a metacharacter rule (metacharacters are not used in this example).
Downloading Match Codes from a Host Device 3–9
7. Click the Outputs button to specify which output activates when a match occurs.
8. Under Available Outputs, select Discrete Input/Output 1.
9. Click the Add>> button to add this selection to the Output To: area.
Sending the Configuration to the Reader
10. Click OK until you return to the Match Table dialog.
11. Click Save and then Close to return to the Project dialog.
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Publication 2755-6.8
3–10 Downloading Match Codes from a Host Device
Finding Match Table
Instances
When you download match codes from a host, you need the instance number of the match table. Do not assume that Match 1 = Instance
1, Match 2 = Instance 2.
From the Project menu, select Print. The printout will show the class and instance numbers.
Connecting the Computer to the RS-232 Port
Disconnect the 2755-NC43 or -NC48 Configuration Cable from the personal computer. Connect the communication cable previously connected to the RS-232 connector in the wiring base to the computer’s RS-232 serial COM port.
Power source required
See reader user manual
Communication Cable
Connect to RS–232 Port
Personal Computer
Publication 2755-6.8
Downloading Match Codes
Downloading Match Codes from a Host Device 3–11
To download match codes from your computer you must:
1. Convert the match string to hex.
2. Enter the match string in the proper data packet format.
3. Send the data packet (containing the string) to the reader.
Convert the Bar Code String to Hex
Convert the bar code string you want to send to the reader to the hexadecimal ASCII equivalent value. For example:
Bar Code String: 0 2 0 0
Converted Hex Value: 30 32 30 30
Converted Bar Code Length Value: 0 4 0 0
In the bar code length shown above, if the number of characters 04 were changed to 14, the hexadecimal value would be 0E. This hexadecimal value is written as 0E00.
Place the String in the Data Packet
The bar code string is sent in a data packet having this format:
3F 10 CE 01 00 03 04 00 30 32 30 30
Instance
Number
# of Characters in Bar Code String
(in hexadecimal)
Bar Code String
The following are descriptions of the data packet:
3F = DeviceNet Address (3F= 63, each reader has unique address)
10 = Set attribute (single request)
CE = 206 = Class (always 206 for match table)
01 = Instance Number (LSB)
00 = Instance Number (MSB)
03 = Attribute Number – Rule
04 = Length of String (LSB)
00 = Length of String (MSB)
30 = ASCII “0”
32 = ASCII “2”
30 = ASCII “0”
30 = ASCII “0”
Note: You can use the Windows calculator to convert decimal values to hexadecimal.
Publication 2755-6.8
3–12 Downloading Match Codes from a Host Device
Send Data to the Reader
1. Use the Windows terminal function to send the data. Locate the terminal icon (usually within the Accessories group icon).
2. Open the terminal icon.
3. From the Settings menu open the Communications dialog and make sure that the settings match the reader serial port settings.
Note: 9600 Baud must be selected.
Publication 2755-6.8
Downloading Match Codes from a Host Device 3–13
4. From the Settings menu open the Terminal Preferences dialog and select Local Echo and Outbound (CR/LF).
5. Return to the terminal window and enter the data string to download. All characters must be in uppercase.
3F10CE010003040030323030
6. Press Return to send the data.
The terminal window will display the response.
3F10CE010003040030323030
3F90
The response of 3F90 indicates a good write of the match code.
3F90
Address (3F = 63) Response Code (90 = Successful)
(94 = Fail)
Note: Refer to the next page for a description of the response code format and codes.
You can verify whether or not a correct match code was downloaded by placing a bar code label in front of the reader so that it is scanned. Observe the Output #1 LED on the top of the reader. When the downloaded match code matches a scanned label, the output will turn on.
If you receive a response code other than 90, refer to the the response code chart on the next page.
Publication 2755-6.8
3–14 Downloading Match Codes from a Host Device
Response Codes
Response codes have the following format:
Byte
2
3
0
1
Contents
Mac ID (Address)
94 = Error Response x = General Error Code x = Additional Code
General Error Codes
08
09
0B
0C
0E
11
13
14
15
16
18
19
D0-FF
Code (hex)
02
0F
10
Name
Resource unavailable
Service not supported
Invalid attribute value
Already in requested mode/state
Object cannot perform service in its current mode/state
Attribute not settable
Access permission does not allow service
Device’s mode/state does not allow object to perform service
Reply data too large
Not enough data
Attribute not supported
Too much data
Object does not exist
No stored attribute data
Store operation failure
Class specific
Publication 2755-6.8
Downloading Match Codes from a Host Device 3–15
Downloading Other Host
Commands
Read Performance Indicator Command
Packet Contents
DeviceNet Address
Get Performance Request
Class
Instance Number (LSB)
Instance Number (MSB)
*3F = Address 63, modify as required
Data Sent
3F*
4C
C8
01
00
You can download other host commands using the same procedures described in the match code example. The following tables provide the commands and responses for the other host commands (all values are hexadecimal).
Read Performance Indicator Response
Packet Contents
DeviceNet Address
Get Performance Response
Data (LSB)
Data (MSB)
Response
3F
CC
01
00
Reset Package Counter Response
Packet Contents
DeviceNet Address
Set Attribute Response
Response
3F
90
Reset Package Counter Command
Packet Contents
DeviceNet Address
Set Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number–
Reset Counters
Data
*3F = Address 63, modify as required
Data Sent
3F*
10
D2
00
00
09
01
Read Match Counters Command
Packet Contents
DeviceNet Address
Get Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number
*3F = Address 63, modify as required
Data Sent
3F*
0E
CE
01
00
08
Read Package Counters Command
Packet Contents
DeviceNet Address
Get Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number–
Match Count
*3F = Address 63, modify as required
Data Sent
3F*
0E
D2
01
00
08
Read Match Counters Response
Packet Contents
DeviceNet Address
Get Attribute Response
Data
Response
3F
8E
6C, 08, 00, 00
Read Package Counters Response
Packet Contents
DeviceNet Address
Get Attribute Response
Data
Response
3F
8E
6C, 08, 00, 00
Publication 2755-6.8
3–16 Downloading Match Codes from a Host Device
Reset Match Counters Command
Packet Contents
Response Codes
Set Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number-
Reset Counters
Data
*3F = Address 63, modify as required
Data Sent
3F*
10
CE
00
00
0B
01
Read Message Command
Packet Contents
DeviceNet Address
Get Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number - Message
*3F = Address 63, modify as required
Data Sent
3F*
0E
CC
00
00
14
Read LED Status Command
Packet Contents
DeviceNet Address
Read LEDS Request
Class
Instance Number (LSB)
Instance Number (MSB)
*3F = Address 63, modify as required
Data Sent
3F*
43
CB
01
00
Reset Match Counters Response
Packet Contents
DeviceNet Address
Set Attribute Response
Response
3F
90
Read Message Response
Packet Contents
DeviceNet Address
Get Attribute Response
Data (LSB)
Data (MSB)
ASCII Message Data
ASCII Message Data
ASCII Message Data
Response
3F
8E
04
00
30*
32
30
ASCII Message Data
* Example data = 0200
30
Read LED Status Response
Packet Contents
3F
Read LEDS Response
I/O 1
I/O 2
Trigger / Read
On Symbol
Response
3F
C3
See Table Next Page
See Table Next Page
See Table Next Page
See Table Next Page
Laser On
Module
Network
See Table Next Page
See Table Next Page
See Table Next Page
Publication 2755-6.8
Downloading Match Codes from a Host Device
Set Output Timer Response
Packet Contents
DeviceNet Address
Set Attribute Response
Response
3F
90
3–17
Set Output Timer Command
Packet Contents
DeviceNet Address
Set Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number - Max Time
Data (LSB)
Data (MSB)
*3F = Address 63, modify as required
** Time in milliseconds
Data Sent
3F*
10
D0
02
00
09
FA
00
Byte
2
3-5
0-2
3-5
Bits
0-2
3-5
0-2
0-2
3-5
LED Indicator
I/O 1
I/O 2
TRIGGER / READ
ON SYMBOL
LASER ON
MODULE
NETWORK
LED Status Response
Data at Indicated Bit Address = LED State
0 = Off 1 = Yellow 2 = Green 3 = Red
4 = Not
Used
5 = Flash
Yellow
OFF ON
OFF
No
Trigger
Not Reading
OFF
ON
Triggered
Reading
ON
Valid
Read
Read
<100%
No Power
Device
OK
DeviceNet
OK
Hardware
Fault
DeviceNet
Fault
6 = Flash
Green
7 = Flash
Red
Power Up
Established
Minor
Fault
No
Response
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Downloading Match Codes via
DH485 Protocol with an SLC
5/03 or SLC 5/04 Controller
This application describes how to download match codes to the bar code reader from an SLC 5/03 or SLC 5/04 controller using DH485 protocol in master and slave modes.
DH485 Master is used for bar code data traveling at medium or slow speeds. Data is sent to the SLC 5/03 or SLC 5/04 controller whether it was requested or not by the SLC 5/03 or SLC 5/04 controller.
DH485 Slave is used for bar code data traveling at high speeds. The
SLC 5/03 or SLC 5/04 controller initiates the request for bar code data.
Refer to chapter 3 for a listing of additional host commands and response codes.
The hardware items required for this application are:
•
2755-SN3, -SN5, or -SN8 AdaptaScan Bar Code Reader
•
2755-PW46 or -PW47 Power Supply
•
2755-NC43 or -NC48 Configuration Cable
•
2755-NB40 or -NB41 Wiring Base (Ser. A/Rev. B or higher)
•
1747-L532, -L541, -L542, or -L543 SLC Processor
•
1746-A4, -A7, -10, or -A13 Chassis
•
1746-P3 Power Supply
•
1747-CP3 RS-232 Programming Cable
•
1747-AIC Isolated Link Coupler or 1761-NET-AIC Advanced
Interface Converter
•
1747-PIC RS-232/DH-485 Converter
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for computers with a 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
•
9323-PA2E Advanced Programming Software. (The original
ICOM SLC software is not compatible with this AdaptaScan network.)
Publication 2755-6.8
4–2 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Related Publications Related publications include:
Publication
2755-837
2755-838
1747-6.2
9399-APSUM-11.15.95
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
SLC 500 Modular Hardware Style Installation and
Operation Manual
Advanced Programming Software User Manual
Connecting a Power
Supply to the Reader
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-
Connecting to the DH-485
Network
Ground Screw on Wiring Base
The wiring base of the AdaptaScan Reader has an RS-485/RS-422 terminal block for point-to-point or network connections.
This section shows three connection options:
•
Connecting readers to SLC 5/03
•
Connecting readers to SLC 5/04 using two 1747-AIC Modules
•
Connecting readers to SLC 5/04 using one 1747-AIC Module
Note: You can use the 1761-NET-AIC Advanced Interface
Converter in place of the 1747-AIC Module.
Important: The DH485 network cable requires proper shielding, grounding and termination. Refer to Data
Highway/Data Highway Plus/Data Highway DH485
Cable Installation Manual (Publication 1770-6.2.2).
Publication 2755-6.8
RS-485/422
RS-485/422
RS-422
RS-422
Ground
Shield
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller 4–3
Important: When setting up a DH-485 network using an
AdaptaScan, make sure that the nodes on the network are in sequential order. The SLC 5/03 or 5/04 should be
Node 1, and AdaptaScan should be Node 2, and each node after that should be 3, 4, and so forth. If other
DH-485 nodes are needed (i.e. DTAM, etc...), the
AdaptaScan node number(s) must be first. Node gaps must be avoided in order to prevent the AdaptaScan from Soliciting of Successor (SOS). By preventing
SOS, bar code throughput is maximized as it is sent to the SLC. In other words, when setting up the
AdaptaScan via DH-485 the first priority is to process bar code data instead of finding node gaps.
Connecting Readers to SLC 5/03 Controller
You must use a link coupler if the distance between the reader and the SLC is greater than 15.2 meters (50 feet). The reader can connect directly to another RS-485/RS-422 device. Point-to-point and network connections are the same.
The end devices on the DH-485 network must be terminated. The wiring base of the AdaptaScan Reader provides a termination switch.
AdaptaScan Wiring Base
RS-422/RS-485 Terminal
SLC 5/03 Processor
Power
Supply
Termination Switch
1747-AIC Module
Term
A
B
Com
Shield
Chassis Gnd Computer
1747-PIC
2755-ASN AdaptaScan Software
SLC 500 Advanced Programming Software
Publication 2755-6.8
4–4 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Power
Supply
Channel 0
RS-232
SLC 5/04 Processor
Connecting Readers to SLC 5/04 Controller – 2 AIC Modules
The SLC 5/04 controller requires two 1747-PIC converters and a power supply to connect to the second 1747-AIC module.
The end devices on a DH-485 network must be terminated. The wiring base of the AdaptaScan Reader provides a termination switch.
1747-PIC
AdaptaScan Wiring Base
RS-422/RS-485 Terminal
DH-485
1747-AIC Module
Term
A
B
Com
Shield
Chassis Gnd
1747-AIC Module
Term
A
B
Com
Shield
Chassis Gnd
1747-P4
24V dc Power Supply
The 1747-P4 Power Supply provides power to both 1747-AIC modules (1 AMP,
24V dc). Otherwise use 2 power supplies.
Computer
DH-485
1747-PIC
RS-232
Publication 2755-6.8
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller 4–5
Power
Supply
Channel 0
RS-232
Connecting Readers to SLC 5/04 Controller – 1 AIC Module
The SLC 5/04 controller requires two 1747-PIC converters.
However, you can use an RJ48 Y adapter (8-wire LAN phone jack plug) to connect the two 1747-PIC modules. The RJ48 Y adapter is a modular adapter for 4-pair cable which parallels two 4-pair jacks and one 4-pair modular plug. This adapter eliminates the second
1747-AIC module shown in the previous SLC 5/04 network diagram.
The end devices on a DH-485 network must be terminated. The wiring base of the AdaptaScan Reader provides a termination switch.
SLC 5/04 Processor
1747-PIC
AdaptaScan Wiring Base
RS-422/RS-485 Terminal
DH-485
1747-AIC Module
Term
A
B
Com
Shield
Chassis Gnd
RJ48 Y Adapter
(8-wire LAN Phone Jack Plug)
Available from Anixter Company
Part No: Hubbell BR851-B
Phone: 414-355-0222
DH-485
1747-PIC
RS-232
Computer
Publication 2755-6.8
4–6 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Configuring Bar Code
Reader 1
This section shows how to configure one the AdaptaScan Bar Code
Readers using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• configure a bar code label and symbol
• define the DeviceNet node address of the AdaptaScan Reader
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the format of messages and the message destination
The steps may vary for some procedures because of the different requirements of applications. For example, the bar code labels may vary from one application to the next.
Create a New Project
Create a new project named DH485 Match Code Download for the
AdaptaScan Bar Code Readers.
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
Publication 2755-6.8
3. Choose Edit from the Project menu to rename the project DH485
Match Code Download.
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Define the Bar Code Label
1. Click the Label button to open the Bar Code Labels dialog.
4–7
2. Click the New button to add a label to open the Bar Code Label dialog.
3. Click the New button to add a symbol.
Publication 2755-6.8
4–8 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
4. Select a symbology and any other parameters (Identifier, Lengths) required by your application.
Publication 2755-6.8
5. Click OK to return to the main Project dialog.
Define the DeviceNet Address
1. Click the Device button to open the Device dialog.
2. Select a DeviceNet address.
Note: The DeviceNet address is not always the same as the
DH-485 node address. A DH-485 node address is assigned later.
3. Connect the 2755-NC43 or -NC48 cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
4–9
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Configure the Decoder Trigger
This application uses a Timer to trigger the reader’s decoder. The
Timer is typically used during application setup. Refer to
Publication 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click Save and Close to return to the main Project dialog.
Publication 2755-6.8
4–10 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Configure the Serial Port
1. Click the Serial Port button from the Project dialog.
2. Set the parameters as follows:
•
From the Protocol list box, select DH-485
•
From the Baud Rate list box, select 19,200
•
Click the Scanner Protocol button
•
From the Connection list box, select RS485
The Serial Port must match the host configuration.
3. Click the Edit button to select either DH485 Slave Mode or
DH485 Master Mode.
Publication 2755-6.8
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
DH485 Slave Mode
1. Click the Protocol Edit button in the Serial Port dialog.
4–11
2. Edit the parameters as follows:
•
Click the PCCC Enabled box
•
From the Master/Slave box, select Slave
•
From the Node box, select 2
This is the DH485 node address.
3. Click OK to return to the main Serial Port dialog.
4. Click Save and Close to return to the main Project dialog.
Publication 2755-6.8
4–12 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
DH485 Master Mode
1. Click the Protocol Edit button in the Serial Port dialog.
2. Set the parameters as follows:
•
From the Master/Slave box, select Master
•
From the Destination Node box, select 1
This is the SLC node where the decoded bar codes are sent.
•
From the Maximum Node box, select 2
This is the number of nodes on the network.
•
From the N9:Offset box, select 100 which is the default
This is the SLC destination address where the decoded bar codes are sent. N9: is reserved for communications. Bar code data is sent as an ASCII string to the SLC N9 file.
•
From the Node box, select 2
This is the DH485 node address.
In this application the response in N9:100 will be 3F90 for a successful match code download or 3F94 for a match code download failure. (3F is the hexadecimal value of the
AdaptaScan device address 63. This will be different for a different applied address.)
3. Click OK to return to the main Serial Port dialog.
4. Click Save and Close to return to the main Project dialog.
Publication 2755-6.8
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Configure for Match Codes
1. Click the Match Table button to open the Match Table dialog.
4–13
2. Click the New button to open the Match Function dialog and create a Match Function.
3. Under Function, select Match Entry.
Match Entry specifies that a match occurs whenever decoded bar code data matches the Rule: entry.
4. Under Symbol Source, select Bar Code Reader 1.
5. Under Bar Code Labels and Symbols, select Symbol 1.
6. Click the Match Exactly box.
Match Exactly specifies that ASCII characters are matched instead of a metacharacter rule.
Publication 2755-6.8
4–14 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
7. Click the Outputs button to specify which output activates when a match occurs.
8. Under Available Outputs, select Discrete Input/Output 1.
9. Click the Add>> button to add this selection to the Output To: area.
10. Click OK to return to the main Match Table dialog.
Configure for a Package
1. Click the Package button to open the Package dialog.
Publication 2755-6.8
2. Click the new button to create a Package.
3. Under Mode, select No-Read or No-Match.
This mode is used to determine when a label is not read or does not match the rule defined in the Match function.
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
4. Highlight Match 1 to enable the Match function.
4–15
5. Click OK to return to the main Package dialog.
Configure for an Output
1. Click the Output To button to specify which output activates when a No-Read or No-Match occurs.
2. Under available Outputs, select Discrete Input/Output 2.
3. Click the Add>> button to add this selection to the
Output To: area.
4. Click OK to return to the main Match Table dialog.
5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
4–16 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Sending the Configuration to the Reader
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Finding Match Table
Instances
When you download match codes from a host, you need the instance number of the match table. Do not assume that Match 1 = Instance
1, Match 2 = Instance 2.
From the Project menu, select Print. The printout will show the class and instance numbers.
Publication 2755-6.8
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Downloading Match Codes
4–17
To download match codes from the SLC you must:
1. Convert the match string to hex.
2. Enter the match string in the proper data packet format (byte swapped).
3. Send the data packet (containing the string) to the reader.
Convert the Bar Code String to Hex
Convert the bar code string you want to send to the reader to the hexadecimal ASCII equivalent value. For example:
Bar Code String: 0 3 0 0
Converted Hex Value: 30 33 30 30
Converted Bar Code Length Value: 0 4 0 0
In the bar code length value shown above, if the number of characters 04 were changed to 14, the hexadecimal value would be
0E. This hexadecimal value is written as 0E00.
Place the String in the Data Packet
The bar code string is sent in a data packet having this format:
3F 10 CE 01 00 03 04 00 30 33 30 30
Instance
Number
# of Characters in Bar Code
String
Bar Code String
The following are descriptions of the data packet:
3F = DeviceNet Address (3F= 63, each reader has unique address)
10 = Set attribute (single request)
CE = 206 = Class (always 206 for match table)
01 = Instance Number (LSB)
00 = Instance Number (MSB)
03 = Attribute Number – Rule
04 = Length of String (LSB)
00 = Length of String (MSB)
30 = ASCII “0”
33 = ASCII “3”
30 = ASCII “0”
30 = ASCII “0”
Note: You can use the Windows calculator to convert decimal values to hexadecimal.
Publication 2755-6.8
4–18 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
The response of 3F90 indicates a good write of the match code.
3F90
Address (3F = 63) Response Code (90 = Successful)
(94 = Fail)
Note: Refer to the next page for a description of the response code format and codes.
You can verify whether or not a correct match code was downloaded by placing a bar code label in front of the reader so that it is scanned.
Observe the Output #1 LED on the top of the reader. When the downloaded match code matches a scanned label, the output will turn on.
If you receive a response code other than 90, refer to the response code chart on the next page.
Publication 2755-6.8
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Response Codes
Response codes have the following format:
Byte
2
3
0
1
Contents
Mac ID (Address)
94 = Error Response x = General Error Code x = Additional Code
General Error Codes
08
09
0B
0C
0E
11
13
14
15
16
18
19
D0-FF
Code (hex)
02
0F
10
Name
Resource unavailable
Service not supported
Invalid attribute value
Already in requested mode/state
Object cannot perform service in its current mode/state
Attribute not settable
Access permission does not allow service
Device’s mode/state does not allow object to perform service
Reply data too large
Not enough data
Attribute not supported
Too much data
Object does not exist
No stored attribute data
Store operation failure
Class specific
4–19
Publication 2755-6.8
4–20 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
Configuring the SLC
Controller
This section describes how to configure the SLC 5/04, which is different than the 5/03.
•
Using APS and an RS-232 connection, establish an online connection the Channel 0 port of the SLC 5/04.
•
When online, change to DH485 protocol and do a WHO ACTIVE to view the nodes on the network.
For complete details on configuring the SLC 5/04 or 5/03 processors, refer to the Advanced Programming Software manuals.
SLC 5/04 Configuration
1. Establish communication with the Channel 0 port of the SLC
5/04 using the 1747-CP3/A RS-232 cable.
Default
On line configuration
DF1 Full–Duplex
No Handshaking
F7 1200
CRC Error Check
Duplicate Detention
No Parity
Enter (twice)
On line (in RS-232)
2. Verify that you are online in “REM RUN”.
Change configuration driver F2 – PIC
Baud Rate 19,200
Max Node 2
F7 Utility
F5 Channel 0 (Master Mode)
Power down and up
Publication 2755-6.8
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
SLC Ladder Logic This section describes how to view match codes
• in Slave Mode via the reader’s LEDs
• in Slave Mode via ladder logic
• in Master Mode via ladder logic
Viewing Match Codes in Slave Mode via the Reader’s LEDs
Use a MSG Write command to download the Match Code Hex commands. The enable bit is toggled [F9] in order to make the download transition. The AdaptaScan I/O LED’s will indicate a good match or a No-Read or No-Match.
4–21
MSG
Read/Write
Type:
Read/Write:
Target Device:
Local/Remote:
Control Block:
PEER-TO-PEER
WRITE
485CIF
LOCAL
N7:200
Control Block Length: 14
Message Instruction Configuration
Type
Parameter
Read/Write
Target Device
Local/Remote
Control Block
Channel
Configuration
Peer-to-Peer
Write
485CIF
Local
N7:200
0
Target Node
Destination File Access
Target Offset
2
N7:90
255 (Change 255 to 256 or 100H in the third word of the
Control Block. An offset greater than 255 tells the MSG instruction that the SLC controller is talking to a bar code device.)
Message Length in Elements 10
Message Timeout (seconds) 10
Publication 2755-6.8
4–22
Byte Location
Byte Swapped
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
N7:90
0
103F
Place the Match Code Hex command (Byte Swapped) in the
Destination File Address N7:90.
• example bar code string = 0300
•
0300 converted to hex = 30333030
•
ASCII Hex command = 3F10CE010003040030333030
1
01CE
2
0300
3
0004
4
3330
5
3030
You can verify whether or not a correct match code was downloaded by placing a bar code label in front of the reader so that it is scanned.
Observe the Output LED’s on the top of the reader. When the downloaded match code matches a scanned label, the Output 1 will turn on, otherwise Output 2 will turn on (for no read or no match).
Viewing Match Code Downloads in Slave Mode via Ladder Logic
Use the following SLC ladder logic for DH485 Slave Mode if the
AdaptaScan I/O LEDs cannot be used for viewing.
]
B3
[
1
]
B3
[
0
MSG
Read/Write
Type:
Read/Write:
Target Device:
Local/Remote:
PEER-TO-PEER
WRITE
485CIF
LOCAL
Control Block: N7:200
Control Block Length: 14
MSG
Read/Write
Type:
Read/Write:
Target Device:
PEER-TO-PEER
READ
485CIF
Local/Remote: LOCAL
Control Block: N7:50
Control Block Length: 14
Note: You can only initiate one read or one write at a time. Reads and writes should never be initiated at the same time.
Publication 2755-6.8
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller 4–23
Message Instruction Configurations
For the first Message Instruction, the configuration is listed in the table below.
Type
Parameter
Read/Write
Target Device
Local/Remote
Control Block
Peer-to-Peer
Write
485CIF
Local
N7:200
Configuration
Channel
Target Node
Destination File Access
Target Offset
0
2
N7:90
255 (Change 255 to 256 or 100H in the third word of the
Control Block. An offset greater than 255 tells the MSG instruction that the SLC controller is talking to a bar code device.)
Message Length in Elements 10
Message Timeout (seconds) 10
For the second Message Instruction, the configuration is listed in the table below.
Parameter
Type
Read/Write
Target Device
Local/Remote
Peer-to-Peer
Read
485CIF
Local
Configuration
Control Block
Channel
Target Node
Destination File Access
Target Offset
Message Length in Elements 2
Message Timeout (seconds) 0
N7:50
0
2
N7:80
255 (Change 255 to 256 or 100H in the third word of the
Control Block. An offset greater than 255 tells the MSG instruction that the SLC controller is talking to a bar code device.)
Publication 2755-6.8
4–24
Byte Location
Byte Swapped
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
N7:90
0
103F
Place the Match Code Hex command (Byte Swapped) in the
Destination File Address N7:90.
• example bar code string = 0300
•
0300 converted to hex = 30333030
•
ASCII Hex command = 3F10CE010003040030333030
1
01CE
2
0300
3
0004
4
3330
5
3030
In Slave Mode, file N7:80 will contain the response for a successful download (i.e. 3F90) or failure (i.e. 3F94).
Address (3F = 63)
3F90
Response Code (90 = Successful)
(94 = Fail)
Note: The response cannot be displayed at the same time as the match code download. For this reason, an Examine If Close (XIC) contact B3:0 is used to control when the response is requested.
Publication 2755-6.8
Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller 4–25
Viewing Match Code Downloads in Master Mode via Ladder
Logic
Use the following SLC ladder logic for DH485 Master Mode if the
AdaptaScan I/O LEDs cannot be used for viewing.
]
B3
[
0
Read/Write
Type:
Read/Write:
Target Device:
PEER-TO-PEER
WRITE
485CIF
Local/Remote: LOCAL
Control Block: N7:100
Control Block Length: 14
Byte Location
Byte Swapped N7:200
0
103F
Message Instruction Configuration
Parameter
Type
Read/Write
Target Device
Local/Remote
Control Block
Peer-to-Peer
Write
485CIF
Local
N7:100
Channel
Target Node
Destination File Access
Target Offset
Message Length in Elements 10
Message Timeout (seconds) 10
0
2
N7:200
255
Configuration
Place the Match Code Hex command (Byte Swapped) in the
Destination File Address N7:200.
• example bar code string = 0300
•
0300 converted to hex = 30333030
•
ASCII Hex command = 3F10CE010003040030333030
1
01CE
2
0300
3
0004
4
3330
5
3030
Publication 2755-6.8
4–26 Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller
In Master Mode, the N9:offset file will contain the response for a successful download (i.e. 3F90) or failure (i.e. 3F94). The offset address (such as N9:100) is configured in the AdaptaScan OLP software (DH485 dialog box). This offset can be any value from
N9:00 to N9:255.
3F90
Address (3F = 63) Response Code (90 = Successful)
(94 = Fail)
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Related Publications
Communicating with a
1746ĆBAS BASIC Module
This application describes how to connect and configure an
AdaptaScan Bar Code Reader to communicate with an SLC 500 processor using the 1746-BAS BASIC module. The bar code reader is reading a 4 character Interleaved 2 of 5 symbol with a <cr> for the message trailer.
The application includes cable diagrams and configuration information for the AdaptaScan Reader. It also includes a sample
SLC 500 program which is needed to establish communications through the RS-232 port of the SLC 5/03 (Frn 6.0) or 5/04.
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
•
1746 SLC 500 Processor
•
1747 chassis
•
1746 power supply
•
1746-BAS BASIC module
•
1746-PIC RS-232/DH-485 convertor or 1761-AIC+
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for computer with a 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
•
9323-PA2x Advanced Programming Software
Publications you might want to refer to include:
Publication
2755-837
2755-838
1746-6.2
1746-6.3
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
BASIC Development Software Programming Manual
BASIC Language Reference Manual
In addition, you may want to refer to the SLC 500 Hardware and
Software User Manuals.
Publication 2755-6.8
5–2 Communicating with a 1746-BAS BASIC Module
Connecting a BASIC
Module to the Reader
The SLC 500 processor occupies the first slot in a 1747 chassis.
Power is supplied externally to the 1747 chassis.
SLC 500
Processor
1747-BAS
Module
AdaptaScan Reader
1747-PIC
RS-232
AdaptaScan Wiring Base
RS232 Terminal Strip
PIN
RX
TX
GND
RS-232 Cable
Pinouts
BASIC Module
User Port 2
PIN
2
3
5
Computer
Publication 2755-6.8
SLC Ladder Logic
Communicating with a 1746-BAS BASIC Module 5–3
Rung 2:0
]
I:1.0
8
[
This section provides the SLC ladder logic program for CALL 22.
The BASIC module is located in slot 1 of the SLC chassis. The
SLC 500 processor is located in slot 0.
At rung 2.0, data is copied from the M1 file when the handshake bit
(I:1.0/8) is set by the BASIC module. The SLC processor sets the handshake bit (O:1.0/8) once the data has been copied out of the M1 file. Setting the bit triggers the BASIC module to turn off bit I:1.0/8.
The first word of the M1 file contains the byte count and this word is not included in the data byte count. The following ladder logic program example has a maximum of 6 bytes of data. I:1.0/8 is the handshake bit from the BASIC module to the SLC processor.
O:1.0/8 is the handshake bit from the SLC processor to the BASIC module.
COP
COPY FILE
Source
Dest
Length
#M1:1.0
#N7:0
6
(
0:1.0
)
8
Rung 2:1
END
Publication 2755-6.8
5–4 Communicating with a 1746-BAS BASIC Module
Programming the BASIC
Module
Refer to the following steps to program the BASIC module.
1. Make sure the BASIC Development Software is loaded onto your personal computer. Refer to the BASIC Development Software
Programming Manual (Publication No. 1746-6.2) for downloading information.
2. Create a project file.
3. Type in the following program. This program will port 2 of the
BASIC module to receive data and then send the data to the SLC
M1 file.
10 PUSH 2 REM PRT2 ACTIVE FOR CALL 22
20 PUSH 6 REM PORT RECEIVING 6 BYTES OF DATA
30 PUSH 13 REM USE A <CR> FOR A TERMINATOR
40 PUSH 1 REM SEND DATA TO THE M1 FILE
50 PUSH 0 REM OFFSET TO M1 FILE
55 PUSH 0 REM STRING NUMBER – NOT USED
60 PUSH 1 REM BYTE SWAPPING ENABLED
70 CALL 22 REM IMPLEMENT CALL STATEMENT
80 POP X REM STATUS OF CALL 22 INSTRUCTION
90 END
4. Press F1 to save the program.
5. Press Esc to return to the Main Menu.
6. Select Terminal [RS–232]. Press Enter.
7. Press F2. Select setup. Select Autobaud. Select Yes. The default baud rate (1200) should appear.
8. Press F2. Select setup. Select Com Port settings. Verify that your communication port settings are correct.
9. Press Enter.
10. Press Enter to save your setup.
11. Press F2.
12. Press Enter.
13. Connect your PC to the BASIC module.
14. Select Download from host to module. Press Enter. Type in the name of your program (from step 4). Press Enter. Your program should now appear on the screen.
15. Type Run and press Enter. Ready should appear on your screen indicating the program ran successfully.
Publication 2755-6.8
SLC BASIC Module Code
Configuring the Reader
Communicating with a 1746-BAS BASIC Module 5–5
Refer to the partial BASIC program listed below to in order for port
2 of the BASIC module to receive data and then send the data to
SLC M1 file.
10 PUSH 2 REM PRT2 ACTIVE FOR CALL 22
20 PUSH 6 REM PORT RECEIVING 6 BYTES OF DATA
30 PUSH 13 REM USE A <CR> FOR A TERMINATOR
40 PUSH 1 REM SEND DATA TO THE M1 FILE
50 PUSH 0 REM OFFSET TO M1 FILE
55 PUSH 0 REM STRING NUMBER – NOT USED
60 PUSH 1 REM BYTE SWAPPING ENABLED
70 CALL 22 REM IMPLEMENT CALL STATEMENT
80 POP X REM STATUS OF CALL 22 INSTRUCTION
90 END
Make sure that the serial port of the BASIC module is set up the same as the AdaptaScan serial port.
This section shows how to configure the AdaptaScan Reader using the AdaptaScan software.
The procedures listed in this section show how to:
• configure a bar code label and symbol
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the format of messages and the message destination
Create a New Project
Create a new project named 1746 BASIC Module for the
AdaptaScan Bar Code Reader.
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
Publication 2755-6.8
5–6 Communicating with a 1746-BAS BASIC Module
3. Choose Edit from the Project menu to rename the project
1746 BASIC Module.
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Publication 2755-6.8
Communicating with a 1746-BAS BASIC Module
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
5–7
3. Click the New button to define a symbol for the label.
4. Select the symbology and define attributes such as Identifier and
Lengths.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
5–8 Communicating with a 1746-BAS BASIC Module
Define the DeviceNet Address
1. Click the Device button to open the Device dialog.
2. Select a DeviceNet address.
Note: The DeviceNet address is not always the same as the
DH-485 node address. A DH-485 node address is assigned later.
3. Connect the 2755-NC43 or -NC48 cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
Communicating with a 1746-BAS BASIC Module
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
5–9
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Publication 2755-6.8
5–10 Communicating with a 1746-BAS BASIC Module
Configure the Decoder Trigger
This application uses a Timer to trigger the reader’s decoder. The
Timer is typically used during application setup. Refer to
Publication 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Configure the Serial Port
1. Click the Serial Port button from the Project dialog.
Publication 2755-6.8
Communicating with a 1746-BAS BASIC Module 5–11
2. Configure the serial port as follows:
•
From the Protocol list box, select Terminal
•
From the Connection list box, select RS232
The configuration must match the host configuration.
3. Click Save and then Close to return to the main Project dialog.
Create a Message
Data sent from the AdaptaScan Reader to the BASIC module uses messages.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to create a message field.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Labels & Symbols, select Symbol 1.
Publication 2755-6.8
5–12 Communicating with a 1746-BAS BASIC Module
8. Check (enable) the Match Exactly check box.
9. Click the Edit button to open the Message Field Edit dialog.
10. Under Replacement Strings, type nr in the Fail: box.
Bar code data is sent to the BASIC module at end of a trigger.
The Fail string sends “nr” to the BASIC module when a no read occurs.
Note: Enter 4 in the Length field of the Data Format. The length parameter must be set to the number of characters in the bar code symbol. The number 4 is chosen because a 4 character I 2 of 5 symbol is being read.
11. Click OK to return to the Message Field dialog.
12. Click OK again to return to the Message dialog.
Define the Message Format
1. Click the Format button from the Message dialog.
Publication 2755-6.8
2. In the Trailer text box, type \r\n.
3. Under Message Destination, select Serial Port.
4. Click OK to return to the Message dialog.
Sending the Configuration to the Reader
Running the Application
Communicating with a 1746-BAS BASIC Module
5. Click Save and then Close to return to the Project dialog.
5–13
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
If the AdaptaScan Bar Code Reader is configured correctly and the
BASIC module and SLC programs are entered as shown in this application example, bar code data or “nr” appears in the SLC processor M1 file.
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Related Publications
Communicating with an SLC over an RSĆ232 Link
This application describes how to connect and configure an
AdaptaScan Bar Code Reader to communicate with an SLC 5/03 or
SLC 5/04 processor using an RS-232 serial connection.
The application includes cable diagrams and configuration information for the AdaptaScan Readers. It also includes a sample
SLC 500 program which is needed to establish communications through the RS-232 port of the SLC 5/03 (Frn 6.0) or 5/04.
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
•
1746 SLC 5/03 Enhanced (Frn 6.0) or 5/04 Processor
•
1747 chassis
•
1746 power supply
•
1747-PIC module for communication between the processor and a personal computer
• appropriate cables to program the SLC 5/03 or 5/04
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for computer with a 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
•
9323-PA2x Advanced Programming Software
Publications you might want to refer to include:
Publication
2755-837
2755-838
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
In addition, you may want to refer to the SLC 500 Hardware and
Software User Manuals.
Publication 2755-6.8
6–2 Communicating with an SLC over an RS-232 Link
Connecting an SLC
Controller to the Reader
The SLC 5/03 or 5/04 occupies the first slot in a 1747 chassis.
Power is supplied externally to the 1747 chassis.
SLC 5/03, 5/04
AdaptaScan Wiring Base
RS232 Terminal Strip
PIN
RX
TX
GND
Power
Supply
AdaptaScan Reader
Host Port
RS-232 Cable
RS-232 Cable
Pinouts
RS-232
User 0 Port
Bulletin 1747 Chassis
SLC 500
User Port 0
PIN
3
2
5
Configuring the SLC
Controller
The screens in this section show the software configuration for the
SLC 5/03 or 5/04 using the APS Programming Software.
•
Set the SLC 500 Channel 0 to USER in the Channel
Configuration Screen.
Publication 2755-6.8
Communicating with an SLC over an RS-232 Link 6–3
•
Configure Channel 0 in the Channel 0 User Mode Configuration screen.
SLC Ladder Logic
Program
Note: Termination 1 is set for
\d
or Carriage Return
[CR]
, and
Termination 2 is set for
\a or Line Feed
[LF]
. These terminators, along with the ARL instruction in the SLC 500, allow the User port to read in one message at a time with
[CR][LF]
terminators.
The sample ladder logic below instructs the SLC 5/03 or 5/04 to read one string of ASCII data terminated with
[CR][LF]
.
Refer to the SLC 5/03 user manual for detailed information on using the SLC 5/03 or 5/04 programming software including the ASCII instructions.
Publication 2755-6.8
6–4 Communicating with an SLC over an RS-232 Link
Configuring the Reader This section shows how to configure the AdaptaScan Bar Code
Reader using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• configure a DeviceNet address
• configure a bar code label and symbol
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the content and format of messages
These procedures provide general guidelines for setting up an application. You may need to modify the configuration for your application needs.
Create a New Project
Create a new project named SLC for one AdaptaScan Bar Code
Reader (Bar Code Reader 1).
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
Publication 2755-6.8
Communicating with an SLC over an RS-232 Link 6–5
3. Choose Edit from the Project menu to rename the project SLC.
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
4. Select a symbology and any other parameters (Identifier, Lengths) required by your application.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
6–6 Communicating with an SLC over an RS-232 Link
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
Communicating with an SLC over an RS-232 Link
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
6–7
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Configure the Decoder Trigger
This application uses a Timer to trigger the reader’s decoder. The
Timer is typically used during application setup. Refer to
Publication No. 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
Publication 2755-6.8
6–8 Communicating with an SLC over an RS-232 Link
Configure the Serial Port
1. Click the Serial Port button on the main Project dialog.
2. Verify that Terminal is selected in the Protocol list box. Also verify that the settings match the Channel 0 User settings.
3. Click the Edit button to open Terminal dialog.
4. Set the attributes as necessary.
Publication 2755-6.8
5. Click OK to exit the dialog.
6. Click the Save and then the Close button on the Serial Port dialog to return to the main Project dialog.
Communicating with an SLC over an RS-232 Link 6–9
Create a Message
The Message dialogs define the format and content of message data sent to the host by the reader when bar codes are decoded.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to define a message field.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Labels & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
9. Click the Edit button to open the Message Field Edit dialog.
Publication 2755-6.8
6–10 Communicating with an SLC over an RS-232 Link
10. Under Replacement Strings, type no read in the Fail: field.
Bar code data is sent to the controller on a valid read. The Fail string sends the characters “no read” when a no read occurs.
11. Click OK to return to the Message Field dialog.
12. Click OK to return to the Message dialog.
Define the Message Format
The format of the message is defined below.
1. Click the Format button from the Message dialog.
2. In the Trailer field, type \r\n (Carriage Return, Line Feed).
3. Under Message Destination, select Serial Port.
4. Click OK to return to the Message dialog.
5. Click the Save button and then the Close button to return to the main Project dialog.
Publication 2755-6.8
Sending the Configuration to the Reader
Running the Application
Communicating with an SLC over an RS-232 Link
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Use the Monitor dialog to verify the decoding of bar code labels.
6–11
If the AdaptaScan Bar Code Reader is configured correctly and the
SLC programs are entered as shown in this application example, bar code data or “no read” will be sent to the SLC user port.
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Communicating with an SLC on a DHĆ485 Network
This application describes how to connect and configure two
AdaptaScan Bar Code Readers to communicate with an SLC 5/03 or
5/04 processor over a DH-485 network in a master mode.
The DeviceNet network has the following nodes:
•
SLC 5/03 or 5/04 on node 1
•
AdaptaScan Bar Code Reader on node 2
•
AdaptaScan Bar Code Reader on node 3
When configuring a DH-485 network with AdaptaScan Readers, the nodes must be in the following order:
•
SLC on node 1
•
AdaptaScan Readers immediately follow SLC (node 2, node 3,...)
•
Other network devices (e.g., DTAM Plus) follow the AdaptaScan
Readers
Avoid node gaps to prevent the AdaptaScan Reader from Soliciting of Successor (SOS). This will maximize bar code throughput as it is sent to the SLC. The priority should be on processing bar code data not on finding node gaps.
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
•
1747-L532 or -L54x SLC processor
•
1746 Chassis and 24V dc Power Supply
•
1747-CP3 RS-232 Programmer Cable
•
1747-AIC Isolated Link Coupler or 1761-NET-AIC Advanced
Interface Converter
•
1747-PIC RS-232/DH-485 Converter
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for computer with a 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
•
9323-PA2x SLC 500 Advanced Programming Software (The original ICOM SLC software is not compatible with this
AdaptaScan network configuration.)
Publication 2755-6.8
7–2 Communicating with an SLC on a DH-485 Network
Related Publications Related publications include:
Publication
2755-837
2755-838
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
In addition, you may want to refer to the SLC 500 Hardware and
Software User Manuals.
Publication 2755-6.8
Connecting a Power
Supply to the Reader
Communicating with an SLC on a DH-485 Network 7–3
The following illustration shows how to connect a 2755-PW46 or
-PW47 power supply to a single bar code reader. The power supply connection applies to both readers.
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-
Connecting to the DH-485
Network
Ground Screw on Wiring Base
The wiring base of the AdaptaScan Reader has an RS-485/RS-422 terminal block for point-to-point or network connections.
This section shows three connection options:
•
Connecting readers to SLC 5/03
•
Connecting readers to SLC 5/04 using two 1747-AIC Modules
•
Connecting readers to SLC 5/04 using one 1747-AIC Module
Note: You can use the 1761-NET-AIC Advanced Interface
Converter in place of the 1747-AIC Module.
Important: The DH485 network cable requires proper shielding, grounding and termination. Refer to Data
Highway/Data Highway Plus/Data Highway DH485
Cable Installation Manual (Publication No.
1770-6.2.2).
Publication 2755-6.8
7–4
RS-485/422
RS-485/422
RS-422
RS-422
Ground
Shield
Communicating with an SLC on a DH-485 Network
Connecting Readers to SLC 5/03 Controller
You must use a link coupler if the distance between the reader and the SLC is greater than 15.2 meters (50 feet). The reader can connect directly to another RS-485/RS-422 device. Point-to-point and network connections are the same.
The end devices on the DH-485 network must be terminated. The wiring base of the AdaptaScan Reader provides a termination switch.
AdaptaScan Wiring Base
RS-422/RS-485 Terminal
SLC 5/03 Processor
Power
Supply
Termination Switch
1747-AIC Module
Term
A
B
Com
Shield
Chassis Gnd Computer
AdaptaScan Wiring Base
RS-422/RS-485 Terminal
1747-PIC
2755-ASN AdaptaScan Software
SLC 500 Advanced Programming Software
Publication 2755-6.8
Communicating with an SLC on a DH-485 Network 7–5
Connecting Readers to SLC 5/04 Controller – 2 AIC Modules
The SLC 5/04 controller requires two 1747-PIC converters and a power supply to connect to the second 1747-AIC module.
The end devices on a DH-485 network must be terminated. The wiring base of the AdaptaScan Reader provides a termination switch.
SLC 5/04 Processor
Power
Supply
Channel 0
RS-232
1747-PIC
DH-485
1747-AIC Module
Term
A
B
Com
Shield
Chassis Gnd
AdaptaScan Wiring Base
RS-422/RS-485 Terminal
AdaptaScan Wiring Base
RS-422/RS-485 Terminal
1747-AIC Module
Term
A
B
Com
Shield
Chassis Gnd
1747-P4
24V dc Power Supply
The 1747-P4 Power Supply provides power to both 1747-AIC modules (1 AMP,
24V dc). Otherwise use 2 power supplies.
Computer
DH-485
1747-PIC
RS-232
Publication 2755-6.8
7–6 Communicating with an SLC on a DH-485 Network
Connecting Readers to SLC 5/04 Controller – 1 AIC Module
The SLC 5/04 controller requires two 1747-PIC converters.
However, you can use an RJ48 Y adapter (8-wire LAN phone jack plug) to connect the two 1747-PIC modules. The RJ48 Y adapter is a modular adapter for 4-pair cable which parallels two 4-pair jacks and one 4-pair modular plug. This adapter eliminates the second
1747-AIC module shown on the previous page.
The end devices on a DH-485 network must be terminated. The wiring base of the AdaptaScan Reader provides a termination switch.
SLC 5/04 Processor
Power
Supply
Channel 0
RS-232
1747-PIC
DH-485
1747-AIC Module
Term
A
B
Com
Shield
Chassis Gnd
AdaptaScan Wiring Base
RS-422/RS-485 Terminal
AdaptaScan Wiring Base
RS-422/RS-485 Terminal
RJ48 Y Adapter
(8-wire LAN Phone Jack Plug)
Available from Anixter Company
Part No: Hubbell BR851-B
Phone: 414-355-0222
DH-485
1747-PIC
RS-232
Computer
Publication 2755-6.8
Configuring the SLC
Controller
Communicating with an SLC on a DH-485 Network 7–7
This section describes how to configure the SLC 5/04, which is different than the 5/03.
•
Using APS and an RS-232 connection, establish an online connection the Channel 0 port of the SLC 5/04.
•
When online, change to DH485 protocol and do a WHO ACTIVE to view the nodes on the network.
For complete details on configuring the SLC 5/04 or 5/03 processors, refer to the Advanced Programming Software manuals.
SLC 5/04 Configuration
1. Establish communication with the Channel 0 port of the SLC
5/04 using the 1747-CP3/A RS-232 cable.
Default
On line configuration
DF1 Full
F7 1200
Enter (twice)
On line (in RS-232)
2. Verify that you are online in “REM RUN”.
Change configuration driver F2 – PIC
Baud Rate 19,200
Max Node 3
F7 Utility
F5 Channel 0 (Master Mode)
Power down and up
Publication 2755-6.8
7–8 Communicating with an SLC on a DH-485 Network
Configuring Bar Code
Reader 1
This section shows how to configure one the AdaptaScan Bar Code
Readers using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• define the DeviceNet node address of the AdaptaScan Reader
• configure a bar code label and symbol
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the format of messages and the message destination
The steps may vary for some procedures because of the different requirements of applications. For example, the bar code labels may vary from one application to the next.
Create a New Project
Create a new project named DH-485 Master Mode for the
AdaptaScan Bar Code Readers.
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
Publication 2755-6.8
Communicating with an SLC on a DH-485 Network
3. Choose Edit from the Project menu to rename the project
DH–485 Master Mode.
7–9
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
4. Select a symbology and any other parameters (Identifier, Lengths) required by your application.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
7–10 Communicating with an SLC on a DH-485 Network
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address to 1.
Note: The DeviceNet address is not always the same as the
DH-485 node address. A DH-485 node address is assigned later.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
Communicating with an SLC on a DH-485 Network
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
7–11
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Publication 2755-6.8
7–12 Communicating with an SLC on a DH-485 Network
Configure the Decoder Trigger
This application uses a Timer to trigger the reader’s decoder. The
Timer is typically used during application setup. Refer to Publication
No. 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Configure the Serial Port
1. Click the Serial Port button from the Project dialog.
Publication 2755-6.8
2. Configure the serial port as follows:
•
From the Protocol list box, select DH-485
•
From the Baud Rate list box, select 19,200
•
From the Connection list box, select RS485
The configuration must match the host configuration.
Communicating with an SLC on a DH-485 Network
3. Click the Edit button under Protocol to edit the DH-485 parameters.
7–13
Edit the parameters as follows:
•
From the Node list box, select 2
This is the node address of the reader on the network.
•
From the Maximum Node list box, select 3
This is the number of nodes on the network.
•
Under Destination, select 1 from the Node list box
This is the SLC node where the decoded bar codes are sent.
•
In the N9:Offset box, type 100 which is the default.
This is the SLC destination address where the decoded bar codes are sent. N9: is reserved for communications. Bar code data is sent as an ASCII string to the SLC file.
4. Click OK to return to the Serial Port dialog.
5. Click Save and then Close to return to the Project dialog.
Publication 2755-6.8
7–14 Communicating with an SLC on a DH-485 Network
Create a Message
Data sent from the AdaptaScan Reader to the SLC processor uses messages.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to create a message field.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Labels & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
Publication 2755-6.8
Communicating with an SLC on a DH-485 Network
9. Click the Edit button to open the Message Field Edit dialog.
7–15
10. Under Replacement Strings, type NO READ 1 in the Fail: box.
Bar code data is sent to the SLC controller on a valid read. The
Fail string sends “NO READ 1” to the controller when a no read occurs on Bar Code Reader 1.
11. Click OK to return to the Message Field dialog.
12. Click OK again to return to the Message dialog.
Define the Message Format
1. Click the Format button from the Message dialog.
2. In the Trailer text box, type \r\n (for CR, LF).
3. Under Message Destination, select Serial Port (This is the serial port of Bar Code Reader 1).
4. Click OK to return to the Message dialog.
5. Click Save and then Close to return to the Project dialog.
Publication 2755-6.8
7–16
Configuring Bar Code
Reader 2
Communicating with an SLC on a DH-485 Network
Sending the Configuration to Reader 1
From the main Project dialog, click the Send Device button to send the configuration to Bar Code Reader 1.
Use the Monitor dialog to verify the decoding of bar code labels.
This section shows how to configure Bar Code Reader 2 which is node 3 on the DH-485 network.
Add a Second Bar Code Reader to the Project
From the Project dialog, click the New button to add Bar Code
Reader 2 to the project.
Publication 2755-6.8
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address to 2 for the configuration download.
Note: The DeviceNet address is not always the same as the
DH-485 node address. A DH-485 node address is assigned later.
3. Connect the 2755-NC43 or -NC48 Configuration Cable.
4. Click the Apply button.
5. Click the Close button and return to the Project dialog.
Communicating with an SLC on a DH-485 Network
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
7–17
3. Click the New button to define a symbol for the label.
4. Select a symbology and any other parameters (Identifier, Lengths) required by your application.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
7–18 Communicating with an SLC on a DH-485 Network
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
Publication 2755-6.8
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Configure the Decoder Trigger
This application uses a Timer to trigger the reader’s decoder. The
Timer is typically used during application setup. Refer to Publication
No. 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
4. Click the Close button and return to the Project dialog.
Communicating with an SLC on a DH-485 Network
Configure the Serial Port
1. Click the Serial Port button from the Project dialog.
7–19
2. Configure the serial port as follows:
•
From the Protocol list box, select DH-485
•
From the Baud Rate list box, select 19,200
•
From the Connection list box, select RS485
3. Click the Edit button under Protocol to edit the DH-485 parameters.
Edit the parameters as follows:
•
From the Node list box, select 3.
This is the node address of the reader on the network.
•
From the Maximum Node list box, select 3.
This is the number of nodes on the network.
•
Under Destination, select 1 from the Node list box.
This is the SLC node where the decoded bar codes are sent.
•
In the N9:Offset box, type 110.
This is the SLC destination address where the decoded bar codes (ASCII string) are sent. N9: is reserved for communications.
4. Click OK to return to the Serial Port dialog.
5. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
7–20 Communicating with an SLC on a DH-485 Network
Create a Message
1. Click the Message button from the Project dialog.
2. Under Triggered By, check the Enable box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to create a message field.
6. Under Symbol Source, select Bar Code Reader 2.
7. Under Bar Code Labels & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
Match exactly specifies that ASCII characters are matched instead of a metacharacter rule.
Publication 2755-6.8
Communicating with an SLC on a DH-485 Network
9. Click the Edit button to open the Message Field Edit dialog.
7–21
10. Under Replacement Strings, type NO READ 2 in the Fail: box.
Bar code data is sent to controller on a valid read; the Fail string sends the message NO READ 2 when a no read occurs from Bar
Code Reader 2.
11. Click OK to return to the Message Field dialog.
12. Click OK again to return to the Message dialog.
Define the Message Format
1. Click the Format button from the Message dialog.
2. In the Trailer text box, type \r\n (for CRLF).
3. Under Message Destination, select Serial Port (This is the serial port of Bar Code Reader 2).
4. Click OK to return to the Message dialog.
5. Click Save and then Close to return to the Project dialog.
Publication 2755-6.8
7–22 Communicating with an SLC on a DH-485 Network
Sending the Configuration to Reader 2
From the main Project dialog, click the Send Device button to send the configuration to Bar Code Reader 2.
Use the Monitor dialog to verify the decoding of bar code labels.
Running the Application
After downloading the configurations to both AdaptaScan Readers, establish an online connection with the SLC processor. Use the SLC data monitor screen to view the bar code data (in ASCII format) in the N9 file.
Note: Data is not sent to the ASCII (ST) file.
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Related Publications
Communicating with a PLCĆ5
R
over an RSĆ232 or RSĆ422 Link
The New Generation PLC-5 processors from Allen–Bradley have a user port that can be used to interface a single point AdaptaScan Bar
Code Reader using either RS-232 or RS-422 communication.
This document includes cable diagrams and configuration information for the AdaptaScan readers. It also includes an example
PLC-5 program which is needed to establish communication through
Channel 0 on the new PLC-5 platform.
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
•
1785 PLC-5 processor
•
1771 chassis
•
1771 power supply
• appropriate cables to program the PLC-5 and to configure the
AdaptaScan Bar Code Reader
•
1784-KT or equivalent card installed in your personal computer to enable you to program the PLC-5
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
•
PLC-5 programming software
Publications you might want to refer to include:
Publication
2755-837
2755-838
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
In addition, you may want to refer to the PLC-5 Hardware and
Software User Manuals.
Publication 2755-6.8
8–2 Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
Connecting the PLC-5
Processor to the Reader
For this application the PLC-5 occupies the first slot in a 1771 chassis. Power is supplied externally or from an internal power supply installed in any acceptable slot in the 1771 chassis.
Bulletin 1771 Chassis
Channel 0
PLC-5
Power Supply
RS-232 or RS-422
RS232 Port
AdaptaScan Reader
Cabling
RS-232 cabling must be constructed to connect the RS232 port of the
AdaptaScan reader to User Port 0 on the PLC-5. Refer to this cabling diagram.
PLC-5/30, /40, /60
Channel 0
PIN
2
AdaptaScan
RS232 Terminal
Strip
PIN
Rx
3
7
Tx
GND
Publication 2755-6.8
Configuring the PLC
Processor
Communicating with a PLC-5
R
over an RS-232 or RS-422 Link 8–3
For RS-422 installations, a special pinout cable must be constructed.
PLC-5/30, /40, /60
Channel 0
PIN
2 TxD+
14 TxD–
3 RxD+
16 RxD–
AdaptaScan
Terminal Strip
RS-422/485
PIN
RxA–
RxB+
TxA–
TxB+
Note: Maximum run length 200 feet
The screens in this section show the software configuration for the
PLC-5 using the programming software.
•
Set the PLC-5 Channel 0 to USER in the Channel Overview screen.
Publication 2755-6.8
8–4 Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
•
Configure Channel 0 in the User Mode Channel 0 Configuration screen.
PLC-5 Ladder Logic
Program
Note: Termination 2 is set for
\0xa or Line Feed
[LF]
, and
Termination 1 is set for
\0xd or Carriage Return
[CR]
. 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.
The sample ladder logic below instructs the PLC-5 to:
•
Read one string of ASCII data terminated with a
[CR][LF]
.
Publication 2755-6.8
Refer to your PLC-5 user manual for detailed information on using the PLC-5 programming software including the ASCII instructions.
Configuring the Reader
Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
This section shows how to configure the AdaptaScan Bar Code
Reader using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• configure a DeviceNet address
• configure a bar code label and symbol
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the content and format of messages
These procedures provide general guidelines for setting up an application. You may need to modify the configuration for your application needs.
8–5
Create a New Project
Create a new project named PLC for one AdaptaScan Bar Code
Reader (Bar Code Reader 1).
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
Publication 2755-6.8
8–6 Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
3. Choose Edit from the Project menu to rename the project PLC.
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
Publication 2755-6.8
4. Select a symbology and any other parameters (Identifier, Lengths) required by your application.
Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the Project dialog.
8–7
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
8–8 Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
Publication 2755-6.8
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Configure the Decoder Trigger
This application uses a Timer to trigger the reader’s decoder. The
Timer is typically used during application setup. Refer to Publication
No. 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click Save and then Close to return to the main Project dialog.
Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
Configure the Serial Port
1. Click the Serial Port button on the main Project dialog.
8–9
2. Verify that Terminal is selected in the Protocol list box. Also verify that the settings match the Channel 0 User settings. In this example, RS232 is selected in the Connection list box.
3. Click the Edit button to open Terminal dialog.
4. Set the attributes as necessary.
5. Click OK to exit the dialog.
6. Click the Save and then the Close button on the Serial Port dialog to return to the Project dialog.
Publication 2755-6.8
8–10 Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
Create a Message
The Message dialogs define the format and content of message data sent to the host by the reader when bar codes are decoded.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to define a message field.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Labels & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
Publication 2755-6.8
Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
9. Click the Edit button to open the Message Field Edit dialog.
8–11
10. Under Replacement Strings, type no read in the Fail: field.
Bar code data is sent to the controller on a valid read. The Fail string sends the characters “no read” when a no read occurs.
11. Click OK to return to the Message Field dialog.
12. Click OK to return to the Message dialog.
Define the Message Format
The format of the message is defined below.
1. Click the Format button from the Message dialog.
2. In the Trailer field, type \r\n (Carriage Return, Line Feed).
3. Under Message Destination, select Serial Port.
4. Click OK to return to the Message dialog.
5. Click the Save button and then the Close button to return to the
Project dialog.
Publication 2755-6.8
8–12 Communicating with a PLC-5
R
over an RS-232 or RS-422 Link
Sending the Configuration to the Reader
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Use the Monitor dialog to verify the decoding of bar code labels.
Running the Application
If the AdaptaScan Bar Code Reader is configured correctly and the
PLC-5 program is entered as shown in this application example, bar code data or “no read” will be sent to the PLC user port.
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Communicating with an SLC
5/03 Processor on a
DeviceNet Network
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. 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
•
1747-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.
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 Box
•
RS-232 cable for the RS-232 Interface Box
•
DeviceNet trunk cable
•
1746 Chassis and 24V dc Power Supply
•
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)
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
9–2 Communicating with an SLC 5/03 Processor on a DeviceNet Network
Related Publications Related publications include:
Publication
2755-837
2755-838
1787-6.5.3
1747-6.5.2
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
DeviceNet Manager Software Manual
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. You must terminate the first and last node in the 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 Box
SLC 5/03 Processor
1747-SDN DeviceNet Scanner
Node 62
1787-MGR DeviceNet Manager Software
SLC 500 Advanced Programming Software
2755-ASN AdaptaScan Software
DeviceNet Trunk Cable
AdaptaScan
Bar Code Reader
Node 3 DeviceNet Trunk Cable
Node 1
Connecting a Power
Supply to the Reader
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
SLC Ladder Logic
Communicating with an SLC 5/03 Processor on a DeviceNet Network 9–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
Discrete
Output O
N22
Location
Word 0 Bit 0
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 AddressingA
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 Word #
Byte #
➀➁
Number of Characters (LSB)
Number of Characters (MSB)
First Message Character
(Beginning of Message)
Other Message Characters from left to right
2
5
2
3
4
Last Message Character
(End of Message)
➀
➁
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
9–4 Communicating with an SLC 5/03 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
1 - Poll
1 - Response
2 - Poll
2 - Response
3 - Poll
3 - Response
Message Data
-
No Message Sent
-
Message 1 Sent
-
Message 2 Sent
DeviceNet
Output #16
DeviceNet
Input #8
OFF (0)
OFF (0)
ON (1)
ON (1)
OFF (0)
OFF (0)
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network 9–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
9–6 Communicating with an SLC 5/03 Processor on a DeviceNet Network
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
Address Data (Radix = ASCII)
N23:0
N23:10
N23:20
\00\00
\00\00
\00\00
\80\01
\00\00
\00\00
N23:30
N23:40
N23:50
N23:60
N23:70
N23:80
N23:90
N23:100
N23:110
N23:120
N23:130
N23:140
N23:150
\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\04
\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
3 0
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
Processor File :MASTER.ACH
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
0 0
\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\00
Data Table File N23
\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
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
Address
Processor File: MASTER.ACH
Data (Radix=BINARY)
N22:0
N22:1
N22:2
N22:3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Data Table File N22
Publication 2755-6.8
1747-SDN to AdaptaScan Interface
Data Table
Address Data (Radix = ASCII)
O:1.9
O:1.10
O:1.11
O:1.12
O:1.13
O:1.14
O:1.15
O:1
O:1.1
O:1.2
O:1.3
O:1.4
O:1.5
O:1.6
O:1.7
O:1.8
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\01
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
Communicating with an SLC 5/03 Processor on a DeviceNet Network
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).
Processor File :MASTER.ACH
Data Table File O
9–7
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
Processor File :MASTER.ACH
Data Table File M1:1
1747-SDN to AdaptaScan Interface
Data Table
Address
M1:1
M1:1.1
M1:1.2
M1:1.3
M1:1.4
M1:1.5
M1:1.6
M1:1.7
M1:1.8
M1:1.9
M1:1.10
M1:1.11
M1:1.12
M1:1.13
M1:1.14
M1O:1.15
Data (Radix = ASCII)
\00\00
\80\01
\00\04
3 0
0 0
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
Publication 2755-6.8
9–8 Communicating with an SLC 5/03 Processor on a DeviceNet Network
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 9–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
Communicating with an SLC 5/03 Processor on a DeviceNet Network 9–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 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
9–10 Communicating with an SLC 5/03 Processor on a DeviceNet Network
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
Communicating with an SLC 5/03 Processor on a DeviceNet Network
12. Click the Data Entry button.
13. Change Map Data From to Poll Message.
14. Change Map Data To M File.
15. Change M1:1. to 1.
16. Change No. Bits to 64.
17. Click Apply Segment.
9–11
The dialog shows the data table map of the SLC M1 file. It displays data from the AdaptaScan Reader, which is mapped to the SLC (File N23).
Word 0 is reserved and 4 words (8 bytes) of the data table are mapped for the incoming string from the reader. Bit 15 is the
‘new message being sent’ bit.
Publication 2755-6.8
9–12 Communicating with an SLC 5/03 Processor on a DeviceNet Network
18. Click the Output button.
19. Change Map Data From to Poll Message.
20. Change Map Data To M File.
21. Change M0:1. to 1.
22. Change No. Bits to 8.
23. Click Apply Segment button.
The dialog shows the data table map of the SLC M0 file. It displays data sent to the AdaptaScan Reader through the SDN
Scanner (N22). 1 byte of data is written to the SDN Scanner.
Bit 7 of Word 1 is the ‘send next message’ bit.
24. Click the Close button to return to the Scanlist Editor dialog.
25. Click the Save to SDN button to download the scanlist to the
1747-SDN Scanner.
Important: Before clicking the Save to SDN button , the
SDN Scanner must be in Idle Mode. Set bit
O:0/1 in the SLC to 0. Another way to place the
SDN Scanner in Idle Mode is to put the SLC into Program Mode.
Publication 2755-6.8
Configuring the Reader
Communicating with an SLC 5/03 Processor on a DeviceNet Network 9–13
This section shows how to configure the AdaptaScan Bar Code
Reader using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• scan/decode 4 character, Interleaved 2 of 5 bar code symbols
• define a DeviceNet address
• configure the scanner
• trigger the decoder
• configure the format of messages and the message destination
Create a New Project
Create a new project named DeviceNet Master/Slave for one
AdaptaScan Bar Code Reader (Bar Code Reader 1).
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
3. Choose Edit from the Project menu to rename the project
DeviceNet Master/Slave.
If you need to change the baud rate, proceed to the next section.
If you do not need to change the baud rate, proceed to step 4.
Publication 2755-6.8
9–14 Communicating with an SLC 5/03 Processor on a DeviceNet Network
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Change the Baud Rate
If you need to change the baud rate:
1. Click on the K Baud button and select the desired baud rate.
2. Click Save and Close to return to the Project dialog.
3. Click the Device button.
4. Click Apply if the desired baud rate is shown.
5. Click Save and Close to return to the Project dialog.
6. Click the Send Device button.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
9–15
3. Click the New button to define a symbol for the label.
4. From the Symbology list, select Interleaved 2 of 5.
5. Under Lengths, select the Length 1 check box and then type 4 in the Through box. This indicates a 4 character length for
Interleaved 2 of 5 labels.
6. Click OK until you return to the Bar Code Labels dialog.
7. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
9–16 Communicating with an SLC 5/03 Processor on a DeviceNet Network
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address to 3.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
Publication 2755-6.8
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Apply button to send the scanner configuration to the
AdaptaScan Bar Code Reader.
4. Click the Close button and return to the Project dialog.
Communicating with an SLC 5/03 Processor on a DeviceNet Network 9–17
Configure the Decoder Trigger
To test the application, use the Timer to trigger the reader’s decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Create a Message
Defines the content of messages sent from the reader to the
1747-SDN Scanner after bar codes have been decoded.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
Publication 2755-6.8
9–18 Communicating with an SLC 5/03 Processor on a DeviceNet Network
5. Click the New button to create a message field.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Label & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
9. Click the Edit button to open the Message Field Edit dialog.
10. Under Replacement Strings, type nr in the Fail: field.
Bar code data is sent to the 1747-SDN Scanner on a valid read; the Fail string sends the characters “nr” to the 1747-SDN when a no read occurs.
11. Under Data Format, type 4 in the Length box.
Important: The Length must match the number of characters in the bar code symbol. This application uses 4 character, Interleaved 2 of 5 symbols.
12. Click OK to return to the Message Field dialog.
13. Click OK to return to the Message dialog.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network
Define the Message Format
This section defines the format and destination of messages sent from the reader.
1. Click the Format button from the Message dialog.
9–19
Sending the Configuration to the Reader
Running the Application
2. Under Message Destination, select DeviceNet.
3. Accept the defaults for all other parameters.
4. Click OK to return to the Message dialog.
5. Click OK again to return to the Message Field dialog.
6. Click Save and then Close to return to the main Project dialog.
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Note: If you are using Send all to download multiple reader configurations, unplug the DeviceNet scanner from the SLC processor.
Use the Monitor dialog to verify the decoding of bar code labels.
If the:
•
AdaptaScan Reader is configured correctly,
• the 1747-SDN Scanner is configured correctly, and
• the ladder program is entered as shown in this application, you will see bar code data or ‘nr’ in the SLC M1 file (N23) as bar code symbols are decoded. Remember that all data is byte swapped.
If the 1747-SDN Scanner is not working properly, refer to the next section.
Publication 2755-6.8
9–20 Communicating with an SLC 5/03 Processor on a DeviceNet Network
Troubleshooting the
Module and Network
The bicolor (green/red) module status indicator (MODULE) displays module status. It indicates whether the module has power and is functioning properly.
Off
If the Module LED is
Solid green
Flashing green
Flashing red
Solid red this indicates the module has an unrecoverable fault.
Take this action there is no power applied to the module.
the module is operating in normal condition.
Apply power.
None the module is not configured.
Configure the module.
there is invalid configuration.
Check configuration setup.
Replace the module.
The DeviceNet channel has a bicolor (green/red) network status indicator (NET). The next table provides troubleshooting information about the DeviceNet channel communication link.
Off
If the NET indicator is
Flashing green
Solid green
Solid red
Flashing red this indicates the channel is disabled for
DeviceNet communication.
the channel is enabled but no communication is occurring.
all slave devices in the scan list table are communicating normally with the module.
Take this action
Power-up the module, provide network power to channel, and be sure channel is enabled in both the module configuration table and module command word.
Configure scan list table for channel to add devices.
None.
the module may be defective.
Reset module. If failures continue, replace module.
at least one of the slave devices in the module’s scan list table has failed to communicate with the module.
Examine the failed device and the scan list table for accuracy.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network 9–21
Your module uses numeric displays to indicate diagnostic information about the status of your module. The display flashes at
1 second intervals. The following table summarizes the meanings of the numeric codes.
Numeric Code
Network Address
Displays 0 - 63
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Indicates normal operation. The numeric display matches the scanner’s node address on the DeviceNet network.
module failed Duplicate Node Address check.
None.
Take this action illegal data in scan list table (node number alternately flashes).
slave device stopped communicating (node number alternately flashes).
device key parameters do not match scan list table entry (node number alternately flashes).
Change the module channel address to another available one. The node address you selected is already in use on that channel.
Reconfigure the scan list table and remove any illegal data.
Inspect the field devices and verify connections.
data overrun on port detected.
no network traffic has been detected.
no direct network traffic for module detected.
data size returned does not match scan lists entry (node number alternately flashes).
slave device in scan list table does not exist
(node number alternately flashes).
module has failed to transmit a message.
module is in IDLE mode.
module is in FAULT mode.
error detected in sequence of fragmented I/O messages from device (node number alternately flashes).
slave device is returning error responses when module attempts to communicate with it (node number alternately flashes).
module is initializing the DeviceNet channel.
data size returned is bigger than expected.
Enter a matching scan list device ID. Make sure that the device at the flashing node address matches the desired key parameters (vendor, product code, product type).
Modify your configuration and check for invalid data.
Verify connections.
None. The module hears other network communication.
Reconfigure your module and change the addressing.
Add the device to the network, or delete the scan list entry for that device.
Make sure that your module is connected to a valid network. Check for disconnected cables.
Verify baud rate.
None.
None.
Check scan list table entry for slave device to make sure that input and output data lengths are correct. Check slave device configuration.
Check accuracy of scan list table entry. Check slave device configuration.
None. This code clears itself once module attempts to initialize all slave devices on the channel.
Check accuracy of scan list table entry. Check slave device configuration.
Check device configuration/slave node status.
device is producing idle state data while the scanner is in Run Mode.
available for allocation. Scanner has not yet been detected by allocated master, or slave mode is enabled but scanner is not allocated to a master.
this is not an error. At power-up and reset, the module displays all 14 segments of the node address and status display LEDs.
Table continued on the next page.
Monitor scanner to determine if error code clears when master detects scanner. If error remains, check scanner slave mode configuration.
None.
Publication 2755-6.8
9–22 Communicating with an SLC 5/03 Processor on a DeviceNet Network
Numeric Code
90
Indicates user has disabled communication port
91 bus-off condition detected on comm port.
module is detecting communication errors.
92 no network power detected on comm port.
95
97
98
99 application FLASH update in progress.
module halted by user command.
Unrecoverable firmware failure.
Unrecoverable hardware failure.
Take this action reconfigure your module. Check the disable bit in the Module Command Register.
Check DeviceNet connections and physical media integrity. Check system for failed slave devices or other possible sources of network interference.
Provide network power. Make sure that module drop cable is providing network power to module comm port.
None. Do not disconnect the module while application FLASH is in progress. You will lose any existing data in the module’s memory.
None.
Service or replace your module.
Service or replace your module.
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Communicating with an SLC
5/03 Processor on a DeviceNet
Network using Explicit
Messaging
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.
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)
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
10–2 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Related Publications Related publications include:
Publication
2755-837
2755-838
1787-6.5.3
1747-6.5.2
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
DeviceNet Manager Software Manual
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
Computer
1770-KFD
DeviceNet
Interface Card
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.
SLC 5/03 Processor
1747-SDN DeviceNet Scanner
Node 62
1787-MGR DeviceNet Manager Software
SLC 500 Advanced Programming Software
2755-ASN AdaptaScan Software
DeviceNet Trunk Cable
AdaptaScan
Bar Code Reader
Node 3
Connecting a Power
Supply to the Reader
DeviceNet Trunk Cable
Node 1
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
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
Discrete
Output O
N22
Location
Word 0 Bit 0
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 Word #
Byte #
➀➁
Number of Characters (LSB)
Number of Characters (MSB)
First Message Character
(Beginning of Message)
Other Message Characters from left to right
2
5
2
3
4
Last Message Character
(End of Message)
➀
➁
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
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
1 - Poll
1 - Response
2 - Poll
2 - Response
3 - Poll
3 - Response
Message Data
-
No Message Sent
-
Message 1 Sent
-
Message 2 Sent
DeviceNet
Output #16
DeviceNet
Input #8
OFF (0)
OFF (0)
ON (1)
ON (1)
OFF (0)
OFF (0)
Publication 2755-6.8
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
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
Address Data (Radix = ASCII)
N23:0
N23:10
N23:20
\00\00
\00\00
\00\00
\80\01
\00\00
\00\00
N23:30
N23:40
N23:50
N23:60
N23:70
N23:80
N23:90
N23:100
N23:110
N23:120
N23:130
N23:140
N23:150
\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\04
\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
3 0
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
Processor File :MASTER.ACH
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
0 0
\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\00
Data Table File N23
\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
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
Address
Processor File: MASTER.ACH
Data (Radix=BINARY)
N22:0
N22:1
N22:2
N22:3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Data Table File N22
Publication 2755-6.8
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).
Processor File :MASTER.ACH
Data Table File O
1747-SDN to AdaptaScan Interface
Data Table
Address Data (Radix = ASCII)
O:1.9
O:1.10
O:1.11
O:1.12
O:1.13
O:1.14
O:1.15
O:1
O:1.1
O:1.2
O:1.3
O:1.4
O:1.5
O:1.6
O:1.7
O:1.8
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\01
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\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
Processor File :MASTER.ACH
Data Table File M1:1
1747-SDN to AdaptaScan Interface
Data Table
Address
M1:1
M1:1.1
M1:1.2
M1:1.3
M1:1.4
M1:1.5
M1:1.6
M1:1.7
M1:1.8
M1:1.9
M1:1.10
M1:1.11
M1:1.12
M1:1.13
M1:1.14
M1O:1.15
Data (Radix = ASCII)
\00\00
\80\01
\00\04
3 0
0 0
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
Publication 2755-6.8
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
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
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
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
12. Click the Data Entry button.
13. Change Map Data From to Poll Message.
14. Change Map Data To M File.
15. Change M1:1. to 1.
16. Change No. Bits to 64.
17. Click Apply Segment.
10–11
The dialog shows the data table map of the SLC M1 file. It displays data from the AdaptaScan Reader, which is mapped to the SLC (File N23).
Word 0 is reserved and 4 words (8 bytes) of the data table are mapped for the incoming string from the reader. Bit 15 is the
‘new message being sent’ bit.
Publication 2755-6.8
10–12 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
18. Click the Output button.
19. Change Map Data From to Poll Message.
20. Change Map Data To M File.
21. Change M0:1. to 1.
22. Change No. Bits to 8.
23. Click Apply Segment button.
The dialog shows the data table map of the SLC M0 file. It displays data sent to the AdaptaScan Reader through the SDN
Scanner (N22). 1 byte of data is written to the SDN Scanner.
Bit 7 of Word 1 is the ‘send next message’ bit.
24. Click the Close button to return to the Scanlist Editor dialog.
25. Click the Save to SDN button to download the scanlist to the
1747-SDN Scanner.
Important: Before clicking the Save to SDN button , the
SDN Scanner must be in Idle Mode. Set bit
O:0/1 in the SLC to 0. Another way to place the
SDN Scanner in Idle Mode is to put the SLC into Program Mode.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Configuring the Reader
10–13
This section shows how to configure the AdaptaScan Bar Code
Reader using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• scan/decode 4 character, Interleaved 2 of 5 bar code symbols
• define a DeviceNet address
• configure the scanner
• trigger the decoder
• configure the format of messages and the message destination
Create a New Project
Create a new project named SLC DeviceNet for one AdaptaScan Bar
Code Reader (Bar Code Reader 1).
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
3. Choose Edit from the Project menu to rename the project SLC
DeviceNet.
If you need to change the baud rate, proceed to the next section.
If you do not need to change the baud rate, proceed to step 4.
Publication 2755-6.8
10–14 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Change the Baud Rate
If you need to change the baud rate:
1. Click on the K Baud button and select the desired baud rate.
2. Click Save and Close to return to the Project dialog.
3. Click the Device button.
4. Click Apply if the desired baud rate is shown.
5. Click Save and Close to return to the Project dialog.
6. Click the Send Device button.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
10–15
3. Click the New button to define a symbol for the label.
4. From the Symbology list, select Interleaved 2 of 5.
5. Under Lengths, select the Length 1 check box and then type 4 in the Through box. This indicates a 4 character length for
Interleaved 2 of 5 labels.
6. Click OK until you return to the Bar Code Labels dialog.
7. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
10–16 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address to 3.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
Publication 2755-6.8
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging 10–17
Configure the Decoder Trigger
To test the application, use the Timer to trigger the reader’s decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Create a Message
Defines the content of messages sent from the reader to the
1747-SDN Scanner after bar codes have been decoded.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
Publication 2755-6.8
10–18 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
5. Click the New button to create a message field.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Label & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
9. Click the Edit button to open the Message Field Edit dialog.
10. Under Replacement Strings, type nr in the Fail: field.
Bar code data is sent to the 1747-SDN Scanner on a valid read; the Fail string sends the characters “nr” to the 1747-SDN when a no read occurs.
11. Under Data Format, type 4 in the Length box.
Important: The Length must match the number of characters in the bar code symbol. This application uses 4 character, Interleaved 2 of 5 symbols.
12. Click OK to return to the Message Field dialog.
13. Click OK to return to the Message dialog.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging 10–19
Define the Message Format
This section defines the format and destination of messages sent from the reader.
1. Click the Format button from the Message dialog.
2. Under Message Destination, select DeviceNet.
3. Accept the defaults for all other parameters.
4. Click OK to return to the Message dialog.
5. Click OK again to return to the Message Field dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
10–20 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Configure for Match Codes
1. Click the Match Table button to open the Match Table dialog.
2. Click the New button to open the Match Function dialog and create a Match Function.
Publication 2755-6.8
3. Under Function, select Match Entry.
Match Entry specifies that a match occurs whenever decoded bar code data matches the Rule: entry.
4. Under Symbol Source, select Bar Code Reader 1.
5. Under Bar Code Labels and Symbols, select Symbol 1.
6. Click the Match Exactly box.
Match Exactly specifies that ASCII characters are matched instead of a metacharacter rule.
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging 10–21
7. Click the Outputs button to specify which output activates when a match occurs.
8. Under Available Outputs, select Discrete Input/Output 1.
9. Click the Add>> button to add this selection to the Output To: area.
10. Click OK to return to the main Match Table dialog.
Publication 2755-6.8
10–22 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Configure for a Package
1. Click the Package button to open the Package dialog.
2. Click the new button to create a Package.
3. Under Mode, select No-Read or No-Match.
This mode is used to determine when a label is not read or does not match the rule defined in the Match function.
4. Highlight Match 1 to enable the Match function.
Publication 2755-6.8
5. Click OK to return to the main Package dialog.
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Configure for an Output
1. Click the Output To button to specify which output activates when a No-Read or No-Match occurs.
10–23
Sending the Configuration to the Reader
Running the Application
2. Under available Outputs, select Discrete Input/Output 2.
3. Click the Add>> button to add this selection to the
Output To: area.
4. Click OK to return to the main Match Table dialog.
5. Click Save and Close to return to the main Project dialog.
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Use the Monitor dialog to verify the decoding of bar code labels.
If the:
•
AdaptaScan Reader is configured correctly,
• the 1747-SDN Scanner is configured correctly, and
• the ladder program is entered as shown in this application, you will see bar code data or ‘nr’ in the SLC M1 file (N23) as bar code symbols are decoded. Remember that all data is byte swapped.
If the 1747-SDN Scanner is not working properly, refer to the troubleshooting section.
Publication 2755-6.8
10–24 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Explicit Message Program
Control
Use the Explicit Message Program Control feature to configure device parameters on your DeviceNet network via the M0 and M1 files in the SLC processor that is controlling these devices.
You can use Explicit Message Program Control only with devices that are slaves of your 1747-SDN Scanner Module. These slave devices must be mapped in the scanner module’s scan list.
Use the Explicit Message Program Control feature to:
• transmit configuration data from your scanner module to its slave devices on your DeviceNet network
• receive status and diagnostics from these devices on your
DeviceNet network
• make runtime adjustments to device parameters according to changing conditions detected by your processor
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Explicit Message Program Control Feature
10–25
5
MC1 file transfer is completed. TXID’s are deleted and can be reused.
MC0 file transfer (including words 224-255)
(sent from processor to scanner module)
4
MC1file transfer (including words 224-255)
(sent from scanner module to processor)
Explicit Message – A message used to transmit commands, data, requests for data or responses. The message is sent from a client on the DeviceNet network to a server on that network.
Request – An explicit message sent by a client to a server requesting the server to perform a function.
Response – An explicit message sent by a server to a client in response to the client’s request. For every request issued, there is a response.
DeviceNet trunk line
Master’s Explicit
Request
DeviceNet drop line
AdaptaScan
Bar Code
Reader
Slave’s Explicit
Response 1203-GK5
Communication
Adapter
1305 AC drive
1. Format an M0 file transfer in the processor to send an Explicit
Message Request to the scanner module (download).
2. The scanner module transmits the Explicit Message Request to the slave device over the DeviceNet network.
3. The slave device transmits the Explicit Message Response back to the scanner and is queued into a file transfer buffer.
4. The processor uses an M1 file transfer to retrieve the Explicit
Message Response from the scanner’s buffer (upload).
5. Format an M0 file transfer with a Delete Response Command and the current transaction ID read in step 4. The transaction IDs are deleted and can be reused.
Publication 2755-6.8
10–26 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Formatting the Explicit Message Transaction Block
Up to ten 32-word transaction blocks may be queued within the scanner module for Explicit Message Program Control. The transaction blocks accommodate both the download of Explicit
Message Requests and the upload of Explicit Message Responses.
The scanner module can accommodate one request or response for each transaction block. You must format each transaction block as shown in the following figure.
Transaction
Header
(3 words)
15
TXID port service cmd/status size
MAC ID
0 word 224 word 225 word 226
Transaction Body
(29 words) word 255
One word = two bytes = 16 bits
The transaction block is divided into two parts:
•
transaction header – Contains information that identifies the transaction to the scanner and processor.
•
transaction body – In a request, this contains the DeviceNet
Class, Instance, Attribute and Service Data portion of the transaction. In a response, this contains only the response message.
Each of the data attributes in the transaction header are one byte in length:
•
command/status – For each download, you assign a command code to instruct the scanner how to administer the request.
Command Code
0
1
2
3
4
5–255
Description
Ignore transaction block (block empty).
Execute this transaction block.
Get status of transaction TXID.
Reset all client/server transactions.
Delete transaction from response queue.
Reserved
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging 10–27
Transaction
Header
(3 words)
15
TXID port service cmd/status size
MAC ID
0 word 224 word 225 word 226
Transaction Body
(29 words)
One word = two bytes = 16 bits word 255
For each upload, the status code provides the processor with status on the device and its response.
Status Code
0
1
4
5
2
3
8
9
6
7
10
Description
Ignore transaction block (block empty).
Transaction completed successfully
Transaction in progress (not ready)
Error – slave not in scan list
Error – slave offline
Error – DeviceNet port disabled/offline
Error – transaction TXID unknown
Unused
Error – Invalid command code
Error – Scanner out of buffers
Error – Other Client/server transaction in progress
Error – could not connect to slave device
Error – response data too large for block
Error – invalid port
Error – invalid size specified
Error – connection busy
11
12
13
14
15
16–255 Reserved
•
TXID (transaction ID) – When you create and download a request to the scanner, the processor’s ladder logic program assigns a TXID to the transaction. This is a one-byte integer in the range of 1 to 255. The scanner uses this value to track the transaction to completion, and returns the value with the response that matches the request downloaded by the processor. The ladder logic program monitors rollover and usage of TXID values.
•
size – The size of the transaction body in bytes. The transaction body can be as many as 29 words (58 bytes) in length. If the size exceeds 29 words, an error code will be returned.
•
port – The DeviceNet port (zero) where the transaction is routed.
•
MAC ID (node address) – The DeviceNet network address of the slave device where the transaction is sent. This value can range from 0 to 63. The port and MAC ID attributes coupled together identify the target slave device. The slave device must be listed in the scanner module’s scan list and be online for the
Explicit Message transaction to be completed successfully.
•
service – For each Explicit Message Request and Response, the service attribute contains the service request and response codes that match the corresponding request for the TXID.
Publication 2755-6.8
10–28 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Transaction
Header
(3 words)
The following figure describes the format and mapping of transaction blocks for request and response messages in the scanner module.
Format of 32-word M0 Transfer File
15 for Explicit Message Request
0
TXID port command size word 224 service MAC ID
Class
Instance
Attribute (optional)
Transaction #1
Transaction
Header
(3 words)
Format of 32-word M1 Transfer File for Explicit Message Response
15 0
TXID port status size word 224 service MAC ID
Transaction #1
Service Response Data
Service Data word 225 word 225
Processor and Scanner Module Manage Messages
File transfer operations between the processor and the scanner always originate in the processor. The scanner module can only wait for the processor to download a transaction block to the module or request an upload of a transaction block from the module.
Once an Explicit Message Request transaction block is downloaded to the scanner module, a ladder logic program in the processor polls the scanner module for the transaction block containing the Explicit
Message Response for that request. This is done by the processor with an M1 file transfer on the scanner module. Depending on the network load, the scanner could take a few seconds to complete the request. When a response is loaded, bit 15 of the module status register is set to 1. The program may have to poll the scanner module a number of times before the scanner returns a Response
Transaction Block.
The scanner module recognizes I/O data and control as higher priorities over explicit messaging on DeviceNet.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Processor
Request
Transaction
Block
10–29
Message lengths and slave device types impact transaction message completion times. If the processor has queued multiple Explicit
Message Transactions to the scanner module for multiple slave devices, the transactions with the slaves may not complete in the order in which the requests were received. The slave responses are queued to the 32 word M1 file transfer in the order in which they are received. As response transaction blocks are uploaded, the processor’s program matches the responses to the requests using the
TXID field.
Scanner Module DeviceNet Network
M0 file transfer
Request
Transaction
Blocks
Scanner
Request
Queue
Ladder Scans
Response
Transaction
Block
M1 file transfer
Execute
Process Requests and Responses
Done or
Error-detected
Response
Transaction
Blocks
Scanner
Response
Queue
DeviceNet
Explicit Message
Requests and
Responses
Slave
Device
Explicit Message Program Control Limitations
•
The processor is always the DeviceNet client and the slave is always the DeviceNet server.
•
A maximum of 10 Explicit Message Request Transaction Blocks with the execute command can be queued to the scanner module at any time. For example, 10 M0 file transfers containing one transactions each, can be queued at any time. The scanner module receives and deletes any additional client/server requests with the execute command over the maximum of 10.
Publication 2755-6.8
10–30 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
As transactions are removed from the queue and response transaction blocks are returned to the processor, additional transaction blocks can be issued in their place, as long as the total does not exceed ten.
•
The scanner module supports one transaction block per upload and download.
•
Request Transaction Blocks can only be queued for slave devices of the scanner module and must appear in the scanner module’s scan list.
•
If a slave device is not communicating at the time the scanner module processes its Request Transaction Block, the scanner module will return an error status for that transaction.
•
At a minimum, the scanner module supports the following
DeviceNet services in Request Transaction Blocks.
Service Name Service Code Example
Get_Attribute_Single 0E hex
Set_Attribute_Single 10 hex
Get_Attribute_All 01 hex
Upload a single parameter value from a device
Download a single parameter value to a device
Upload all parameter values from a device
Set_Attribute_All 02 hex
Download all parameter values to a device
•
All transaction blocks are processed, therefore, an unused transaction block must be left blank.
•
Client/Server commands and requests with transaction IDs that are in use are ignored by the scanner module.
•
If a slave device returns a DeviceNet error in response to the request downloaded from the processor, the scanner recognizes the error as a successful transaction (status code =1).
A failure to respond to the request within the number of retries or timeout period specified for the Explicit Message Connection is recognized by the scanner module as an error. The error code is returned in the status attribute of the transaction header.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging 10–31
Explicit Messaging Ladder Logic Program
Note: The following ladder logic program is for reference only.
Application specific interlocks may be necessary.
Enable Rung B3 to initiate the writing of an APM command to the AdaptaScan.
The APM command that resides in N20:0. The DeviceNet address being written to, in this example is, 10 or 0AH.
]
B3
[
0
COP
Copy File
Source
Destination
Length
#N20:0
#M0:1.224
32
If bit 15 is enabled, read the response data from the above command into file
N25:0.
]
I:1
[
15
COP
Source
Destination
Length
#M1:1.224
#N25:0
32
Example Data Tables
Refer to p. 10–27 for information regarding each byte.
Address Data = Hex Code (matchcode download of 0300 data)
N20:0 0101 000C 100A 00CE 0001 0003 0004 3330 3030
Address
N25:0
Response File (good response)
0101 900C
Address Data = Hex Code (turn on LED1)
N20:0 0101 0008 100A 00C9 0002 0003 0001
Note: You need to send a reset command for every explicit command that is executed in order to receive a good response.
Publication 2755-6.8
10–32 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Notes on using Explicit Messaging
•
You can send messages sequentially from the SLC 5/03 to different bar code readers, but the response will not update properly (when the response is read in N25:0).
•
The TXID byte does not need to be incremented, although you may not know where the response came from.
•
To receive the correct response from the command sent from the
SLC 5/03 you must:
1. Send command down, matchcode download (TXID=11).
2. Send a 03 in the status command. Refer to page 10–26 for more information.
3. Increment TXID to 12.
4. Send command down, turn on LED 1 (TXID=12).
5. View N25:0 for response to step 4.
6. Confirm that TXID=12. If your response is 90, the command was sent correctly. If you receive a 94, the was not sent correctly.
•
If an incorrectly formatted command is sent from the SLC 5/03, you must send a 03 in the status command byte in order for the system to operate properly.
•
When sending a 03 in the status command byte, the SDN card will produce an error until the next command is sent.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Troubleshooting the
Module and Network
10–33
The bicolor (green/red) module status indicator (MODULE) displays module status. It indicates whether the module has power and is functioning properly.
Off
If the Module LED is
Solid green
Flashing green
Flashing red
Solid red this indicates the module has an unrecoverable fault.
Take this action there is no power applied to the module.
the module is operating in normal condition.
Apply power.
None the module is not configured.
Configure the module.
there is invalid configuration.
Check configuration setup.
Replace the module.
The DeviceNet channel has a bicolor (green/red) network status indicator (NET). The next table provides troubleshooting information about the DeviceNet channel communication link.
Off
If the NET indicator is
Flashing green
Solid green
Solid red
Flashing red this indicates the channel is disabled for
DeviceNet communication.
the channel is enabled but no communication is occurring.
all slave devices in the scan list table are communicating normally with the module.
Take this action
Power-up the module, provide network power to channel, and be sure channel is enabled in both the module configuration table and module command word.
Configure scan list table for channel to add devices.
None.
the module may be defective.
Reset module. If failures continue, replace module.
at least one of the slave devices in the module’s scan list table has failed to communicate with the module.
Examine the failed device and the scan list table for accuracy.
Publication 2755-6.8
10–34 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Your module uses numeric displays to indicate diagnostic information about the status of your module. The display flashes at
1 second intervals. The following table summarizes the meanings of the numeric codes.
Numeric Code
Network Address
Displays 0 - 63
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Indicates normal operation. The numeric display matches the scanner’s node address on the DeviceNet network.
module failed Duplicate Node Address check.
None.
Take this action illegal data in scan list table (node number alternately flashes).
slave device stopped communicating (node number alternately flashes).
device key parameters do not match scan list table entry (node number alternately flashes).
Change the module channel address to another available one. The node address you selected is already in use on that channel.
Reconfigure the scan list table and remove any illegal data.
Inspect the field devices and verify connections.
data overrun on port detected.
no network traffic has been detected.
no direct network traffic for module detected.
data size returned does not match scan lists entry (node number alternately flashes).
slave device in scan list table does not exist
(node number alternately flashes).
module has failed to transmit a message.
module is in IDLE mode.
module is in FAULT mode.
error detected in sequence of fragmented I/O messages from device (node number alternately flashes).
slave device is returning error responses when module attempts to communicate with it (node number alternately flashes).
module is initializing the DeviceNet channel.
data size returned is bigger than expected.
Enter a matching scan list device ID. Make sure that the device at the flashing node address matches the desired key parameters (vendor, product code, product type).
Modify your configuration and check for invalid data.
Verify connections.
None. The module hears other network communication.
Reconfigure your module and change the addressing.
Add the device to the network, or delete the scan list entry for that device.
Make sure that your module is connected to a valid network. Check for disconnected cables.
Verify baud rate.
None.
None.
Check scan list table entry for slave device to make sure that input and output data lengths are correct. Check slave device configuration.
Check accuracy of scan list table entry. Check slave device configuration.
None. This code clears itself once module attempts to initialize all slave devices on the channel.
Check accuracy of scan list table entry. Check slave device configuration.
Check device configuration/slave node status.
device is producing idle state data while the scanner is in Run Mode.
available for allocation. Scanner has not yet been detected by allocated master, or slave mode is enabled but scanner is not allocated to a master.
this is not an error. At power-up and reset, the module displays all 14 segments of the node address and status display LEDs.
Table continued on the next page.
Monitor scanner to determine if error code clears when master detects scanner. If error remains, check scanner slave mode configuration.
None.
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging 10–35
Numeric Code
90
Indicates user has disabled communication port
91 bus-off condition detected on comm port.
module is detecting communication errors.
92 no network power detected on comm port.
95
97
98
99 application FLASH update in progress.
module halted by user command.
Unrecoverable firmware failure.
Unrecoverable hardware failure.
Take this action reconfigure your module. Check the disable bit in the Module Command Register.
Check DeviceNet connections and physical media integrity. Check system for failed slave devices or other possible sources of network interference.
Provide network power. Make sure that module drop cable is providing network power to module comm port.
None. Do not disconnect the module while application FLASH is in progress. You will lose any existing data in the module’s memory.
None.
Service or replace your module.
Service or replace your module.
Publication 2755-6.8
10–36 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Downloading Other Host
Commands
Read Performance Indicator Command
Packet Contents
DeviceNet Address
Get Performance Request
Class
Instance Number (LSB)
Instance Number (MSB)
*3F = Address 63, modify as required
Data Sent
3F*
4C
C8
01
00
You can download other host commands using the same procedures described in the match code example. The following tables provide the commands and responses for the other host commands (all values are hexadecimal).
Read Performance Indicator Response
Packet Contents
DeviceNet Address
Get Performance Response
Data (LSB)
Data (MSB)
Response
3F
CC
01
00
Reset Package Counter Response
Packet Contents
DeviceNet Address
Set Attribute Response
Response
3F
90
Reset Package Counter Command
Packet Contents
DeviceNet Address
Set Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number–
Reset Counters
Data
*3F = Address 63, modify as required
Data Sent
3F*
10
D2
00
00
09
01
Read Match Counters Command
Packet Contents
DeviceNet Address
Get Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number
*3F = Address 63, modify as required
Data Sent
3F*
0E
CE
01
00
08
Read Package Counters Command
Packet Contents
DeviceNet Address
Get Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number–
Match Count
*3F = Address 63, modify as required
Data Sent
3F*
0E
D2
01
00
08
Read Match Counters Response
Packet Contents
DeviceNet Address
Get Attribute Response
Data
Response
3F
8E
6C, 08, 00, 00
Read Package Counters Response
Packet Contents
DeviceNet Address
Get Attribute Response
Data
Response
3F
8E
6C, 08, 00, 00
Publication 2755-6.8
Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Reset Match Counters Command
Packet Contents
Response Codes
Set Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number-
Reset Counters
Data
*3F = Address 63, modify as required
Data Sent
3F*
10
CE
00
00
0B
01
Read Message Command
Packet Contents
DeviceNet Address
Get Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number - Message
*3F = Address 63, modify as required
Data Sent
3F*
0E
CC
00
00
14
Read LED Status Command
Packet Contents
DeviceNet Address
Read LEDS Request
Class
Instance Number (LSB)
Instance Number (MSB)
*3F = Address 63, modify as required
Data Sent
3F*
43
CB
01
00
Reset Match Counters Response
Packet Contents
DeviceNet Address
Set Attribute Response
Response
3F
90
Read Message Response
Packet Contents
DeviceNet Address
Get Attribute Response
Data (LSB)
Data (MSB)
ASCII Message Data
ASCII Message Data
ASCII Message Data
ASCII Message Data
* Example data = 0200
Response
3F
8E
04
00
30*
32
30
30
Read LED Status Response
Packet Contents
3F
Read LEDS Response
I/O 1
I/O 2
Trigger / Read
On Symbol
Response
3F
C3
See Table Next Page
See Table Next Page
See Table Next Page
See Table Next Page
Laser On
Module
Network
See Table Next Page
See Table Next Page
See Table Next Page
10–37
Publication 2755-6.8
10–38 Communicating with an SLC 5/03 Processor on a DeviceNet Network using Explicit Messaging
Set Output Timer Command
Packet Contents
DeviceNet Address
Set Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number - Max Time
Data (LSB)
Data (MSB)
*3F = Address 63, modify as required
** Time in milliseconds
Data Sent
3F*
10
D0
02
00
09
FA
00
Set Output Timer Response
Packet Contents
DeviceNet Address
Set Attribute Response
Response
3F
90
Byte
2
3-5
0-2
3-5
Bits
0-2
3-5
0-2
0-2
3-5
LED Indicator
I/O 1
I/O 2
TRIGGER / READ
ON SYMBOL
LASER ON
MODULE
NETWORK
LED Status Response
Data at Indicated Bit Address = LED State
0 = Off 1 = Yellow 2 = Green 3 = Red
4 = Not
Used
5 = Flash
Yellow
OFF ON
OFF
No
Trigger
Not Reading
OFF
ON
Triggered
Reading
ON
Valid
Read
Read
<100%
No Power
Device
OK
DeviceNet
OK
Hardware
Fault
DeviceNet
Fault
6 = Flash
Green
7 = Flash
Red
Power Up
Established
Minor
Fault
No
Response
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Communicating with a PLCĆ5
Processor on a DeviceNet
Network
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.
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)
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
11–2 Communicating with a PLC-5 Processor on a DeviceNet Network
Related Publications Related publications include:
Publication
2755-837
2755-838
1787-6.5.3
1771-6.5.118
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
DeviceNet Manager Software Manual
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
Computer
1770-KFD
DeviceNet
Interface Card
The following illustration shows the three nodes of the DeviceNet master/slave network.
PLC-5 Processor
1771-SDN DeviceNet Scanner
Node 62
1787-MGR DeviceNet Manager Software
6200 Series Programming Software
2755-ASN AdaptaScan Software
AdaptaScan
Bar Code Reader
DeviceNet Trunk Cable Node 3
Node 1
DeviceNet Trunk Cable
Connecting a Power
Supply to the Reader
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
PLC Ladder Logic
Communicating with a PLC-5 Processor on a DeviceNet Network 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 Location
Word 0
Word 1 Bit 15
Word 0
N22 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 Word #
Byte #
➀➁
Number of Characters (LSB)
Number of Characters (MSB)
First Message Character
(Beginning of Message)
2
2
3
4
Other Message Characters from left to right
5
Last Message Character
(End of Message)
➀
➁
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
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
1 - Poll
1 - Response
2 - Poll
2 - Response
3 - Poll
3 - Response
Message Data
-
No Message Sent
-
Message 1 Sent
-
Message 2 Sent
DeviceNet
Output #16
DeviceNet
Input #8
OFF (0)
OFF (0)
ON (1)
ON (1)
OFF (0)
OFF (0)
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network
Note: The following ladder logic program is for reference only.
Application specific interlocks may be necessary.
11–5
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
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.
N23:50
N23:60
N23:70
N23:80
N23:90
N23:100
N23:110
N23:120
N23:130
N23:140
N23:150
1771-SDN to AdaptaScan Interface
Data Table
Address Data (Radix = ASCII)
N23:0 \00\00 \80\01
N23:10
N23:20
N23:30
N23:40
\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\04
\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
3 0
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
Processor File :MASTER.ACH
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
0 0
\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\00
Data Table File N23
\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
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 Processor File: MASTER.ACH
Address
N22:0
Data (Radix=BINARY)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
N22:1
N22:2
N22:3
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Data Table File N22
Publication 2755-6.8
Configuring the DeviceNet
Scanner
Communicating with a PLC-5 Processor on a DeviceNet Network
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
11–7
Publication 2755-6.8
11–8 Communicating with a PLC-5 Processor on a DeviceNet Network
4. Double-click the 1771-SDN Scanner Module to open the
1771-SDN Module and Channel Configuration dialog.
5. Set the following PLC Interface Addresses. All other default values can remain the same.
BXfer 62
Input
N23:0
Output
N22:0
The PLC ladder logic uses these addresses in the Block Transfer
Read (N23:0) and Block Transfer Write (N22:0) instructions.
The SDN scanner maps data from the AdaptaScan Reader to its
62 word file. This selection maps data to the N23 file in the PLC.
The BTW instruction writes data from the N22 file to the 62 word file in the SDN scanner.
If you are using an AdaptaScan with v7.0 (or lower) firmware on a network with 2 or more 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.
Note: Version 8.0 of the AdaptaScan Offline Programming
Software and firmware minimizes DeviceNet polling interruption of scanning.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network
6. Click the Edit Scan List button to open the Scan List Editor.
11–9
7. Select A03 and click the Edit I/O Parameters button.
8. Edit the following parameters in the Edit Device I/O Parameters dialog:
•
Under I/O Type, select the Polled check box.
•
In the Poll Rx Size box, type 8 (Bytes)
•
In the Poll Tx Size box, type 1 (Bytes)
•
From the Poll Rate list box, select Every Scan.
The dialog should look like this:
9. Click OK to return to the Scan List Editor dialog.
Node 3 (AdaptaScan) is enabled and will be polled by the SDN scanner. The SDN scanner will expect 8 bytes of data (4 characters + 4 bytes of overhead) and will transmit 1 byte of data back to the module (BTW N22:1).
Publication 2755-6.8
11–10 Communicating with a PLC-5 Processor on a DeviceNet Network
10. Click the Datatable Map button to open the Datatable Map dialog.
The dialog shows the data table map of the N23 file. The data from the AdaptaScan Reader is mapped to the PLC (BTR N23).
•
Word 0 is reserved
•
4 words (8 bytes) are mapped for the incoming string from the
AdaptaScan Reader.
•
Bit 15 is the ‘new message being sent’ bit.
11. Click the Data Entry button.
12. Change Map Data From to Poll Message.
13. Change Map Data To Block Transfer 62.
14. Change N23:0 to 1.
15. Change No. Bits to 64.
16. Click Apply Segment.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network 11–11
17. Next to Data Map, select Output to view the output file (N22).
The dialog shows the data table map for the N22 file. The data map represents data sent to the AdaptaScan Reader through the
SDN Scanner (BTW N22)
•
Word 1 writes one byte of data to the module.
•
Bit 7 of word 1 is the ‘send next message’ bit.
18. Change Map Data From to Poll Message.
19. Change Map Data To Block Transfer 62.
20. Change N22:0 to 1.
21. Change No. Bits to 8.
22. Click Apply Segment button.
23. Click Close to return the Scan List Editor dialog.
24. Click the Save To File button and then the Save to SDN button to download the scan list the 1771-SDN Scanner.
Important: Before clicking the Save to SDN button , the
SDN Scanner must be in Idle Mode. Set bit 0 of word 0 in the BTW N22 file to 0 (N22:0/0=0).
Another way to place the SDN Scanner in Idle
Mode is to put the PLC into Program Mode.
Publication 2755-6.8
11–12 Communicating with a PLC-5 Processor on a DeviceNet Network
Configuring the Reader This section shows how to configure the AdaptaScan Bar Code
Reader using AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• scan/decode 4 character, Interleaved 2 of 5 labels
• define a DeviceNet address
• configure the scanner
• configure the decoder trigger
• configure the format of messages and the message destination
Create a New Project
Create a new project named PLC DeviceNet for one AdaptaScan Bar
Code Reader (Bar Code Reader 1).
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
Publication 2755-6.8
3. Choose Edit from the Project menu to rename the project PLC
DeviceNet.
If you need to change the baud rate, proceed to the next section.
If you do not need to change the baud rate, proceed to step 4.
Communicating with a PLC-5 Processor on a DeviceNet Network 11–13
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Change the Baud Rate
If you need to change the baud rate:
1. Click on the K Baud button and select the desired baud rate.
2. Click Save and Close to return to the Project dialog.
3. Click the Device button.
4. Click Apply if the desired baud rate is shown.
5. Click Save and Close to return to the Project dialog.
6. Click the Send Device button.
Publication 2755-6.8
11–14 Communicating with a PLC-5 Processor on a DeviceNet Network
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
4. From the Symbology list, select Interleaved 2 of 5.
5. Under Lengths, select the Length 1 check box and then type 4 in the Through box. This indicates a 4 character length for
Interleaved 2 of 5 labels.
6. Click OK until you return to the Bar Code Labels dialog.
7. Click Save and then Close to return to the Project dialog.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
11–15
2. Set the DeviceNet address to 3.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Publication 2755-6.8
11–16 Communicating with a PLC-5 Processor on a DeviceNet Network
Configure the Decoder Trigger
To test the application, use the Timer to trigger the reader’s decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Create a Message
This section defines the content of messages sent to the 1771-SDN
Scanner.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
Publication 2755-6.8
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
Communicating with a PLC-5 Processor on a DeviceNet Network
5. Click the New button to create a message field.
11–17
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Label & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
9. Click the Edit button to open the Message Field Edit dialog.
10. Under Replacement Strings, type nr in the Fail: field.
Bar code data is sent to the 1771-SDN Scanner on a valid read; the Fail string send the characters nr when a no read occurs.
11. Under Data Format, type 4 in the Length box.
Important: The Length must match the number of characters in the bar code symbol. This application uses 4 character, Interleaved 2 of 5 symbols.
12. Click OK to return to the Message Field dialog.
13. Click OK to return to the Message dialog.
Publication 2755-6.8
11–18 Communicating with a PLC-5 Processor on a DeviceNet Network
Define the Message Format
The section defines the format and destination of the messages sent from the reader.
1. Click the Format button from the Message dialog.
Sending the Configuration to the Reader
Running the Application
2. Under Message Destination, select DeviceNet.
3. Accept the defaults for all other parameters.
4. Click OK to return to the Message dialog.
5. Click Save and then Close to return to the main Project dialog.
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Use the Monitor dialog to verify the decoding of bar code labels.
If the:
•
AdaptaScan Reader is configured correctly
•
1771-SDN Scanner is configured correctly
• ladder program is entered as shown in this application you will see bar code data or ‘nr’ in the PLC BTR (N23) file.
Remember that all data is byte swapped.
Publication 2755-6.8
Troubleshooting Your
Module
Channel 1
Top part of module
Module Status
Indicator
Network Status
Indicator
Communicating with a PLC-5 Processor on a DeviceNet Network 11–19
The bicolor (green/red) module status indicator displays device status. The LED indicates whether the device has power and is functioning properly.
If the Module LED is
Off
Solid green
Flashing green
Flashing red
Solid red this indicates Take this action there is no power applied to the module.
the module is operating in normal condition.
Apply power.
None the module is not configured.
Configure the module.
there is invalid configuration.
Check configuration setup and verify dip switch settings.
the module has an unrecoverable fault.
Replace the module.
Channels 1 and 2 each have a bicolor (green/red) network status indicator. The following table provides troubleshooting information about the Channel 1 and 2 communication links.
Off
If the NET indicator is
Flashing green
Solid green
Solid red
Flashing red this indicates the channel is disabled for
DeviceNet communication.
Take this action
Power-up the module, provide network power to channel, and be sure channel is enabled in both the module configuration table and module command word.
the channel is enabled but no communication is occurring.
all slave devices in the scan list table are communicating normally with the module.
Configure scan list table for channel to add devices.
None.
the module may be defective.
Reset module. If failures continue, replace module.
at least one of the slave devices in the module’s scan list table has failed to communicate with the module.
The network has faulted.
Examine the failed device and the scan list table for accuracy.
Publication 2755-6.8
11–20
Top part of module
Communicating with a PLC-5 Processor on a DeviceNet Network
Channel 1
Node Address /
Status Indicator
Your 1771-SDN Scanner Module has a node address/status indicator that uses numeric displays to indicate diagnostic information about your module. The display flashes at approximately 1 second intervals, depending on network traffic. The following table summarizes the meanings of the numeric codes.
Numeric Code
Network Address
Displays 0 - 63
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
88
Indicates normal operation. The numeric display matches the scanner’s node address on the DeviceNet network.
module failed Duplicate Node Address check.
None.
Take this action illegal data in scan list table (node number alternately flashes).
slave device stopped communicating (node number alternately flashes).
device key parameters do not match scan list table entry (node number alternately flashes).
data overrun on port detected.
Change the module channel address to another available one. The node address you selected is already in use on that channel.
Reconfigure the scan list table and remove any illegal data.
Inspect the field devices and verify connections.
no network traffic has been detected.
no direct network traffic for module detected.
data size expected does not match scan lists entry (node number alternately flashes).
slave device in scan list table does not exist
(node number alternately flashes).
module has failed to transmit a message.
module is in IDLE mode.
module is in FAULT mode.
error detected in sequence of fragmented I/O messages from device (node number alternately flashes).
slave device is returning error responses when module attempts to communicate with it (node number alternately flashes).
module is initializing the DeviceNet channel.
Modify your configuration and check for invalid data. Check network communication traffic.
Verify connections.
None. The module hears other network communication.
Reconfigure your module for the correct transmit and receive data sizes
Add the device to the network, or delete the scan list entry for that device.
Make sure that your module is connected to a valid network. Check for disconnected cables.
Place PLC-5 in Run mode.
Check ladder program for cause of fault bits.
Check scan list table entry for slave device to make sure that input and output data lengths are correct. Check slave device configuration.
Check accuracy of scan list table entry. Check slave device configuration. Slave device may be in another master’s scan list. Reboot slave device.
None. This code clears itself once module attempts to initialize all slave devices on the channel.
Configure device for smaller data size.
data size returned is bigger than 255 bytes
(node number alternately flashes).
device is producing idle state data while the scanner is in Run Mode.
this is not an error. At power-up and reset, the module displays all 14 segments of the node address and status display LEDs.
Table continued on the next page.
Enter a matching scan list device ID.
Check device configuration/slave node status.
None.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network 11–21
Numeric Code
90
Indicates user has disabled communication port
91 bus-off condition detected on comm port.
module is detecting communication errors.
92 no network power detected on comm port.
95
97
98
99 application FLASH update in progress.
module halted by user command.
Unrecoverable firmware failure.
Unrecoverable hardware failure.
Take this action reconfigure your module. Check the disable bit in the Module Command Register.
Check DeviceNet connections and physical media integrity. Check system for failed slave devices or other possible sources of network interference.
Provide network power. Make sure that module drop cable is providing network power to module comm port.
None. Do not disconnect the module while application FLASH is in progress. You will lose any existing data in the module’s memory.
Check ladder program for cause of fault bits.
Service or replace your module.
Service or replace your module.
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Communicating with a PLCĆ5
Processor on a DeviceNet
Network using Explicit
Messaging
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 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.
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)
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
12–2 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Related Publications Related publications include:
Publication
2755-837
2755-838
1787-6.5.3
1771-6.5.118
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
DeviceNet Manager Software Manual
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
Computer
1770-KFD
DeviceNet
Interface Card
The following illustration shows the three nodes of the DeviceNet master/slave network.
PLC-5 Processor
1771-SDN DeviceNet Scanner
Node 62
1787-MGR DeviceNet Manager Software
6200 Series Programming Software
2755-ASN AdaptaScan Software
AdaptaScan
Bar Code Reader
DeviceNet Trunk Cable Node 3
Node 1
DeviceNet Trunk Cable
Connecting a Power
Supply to the Reader
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
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
PLC Ladder Logic
12–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 Location
Word 0
Word 1 Bit 15
Word 0
N22 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 AddressingD
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 Word #
Byte #
➀➁
Number of Characters (LSB)
Number of Characters (MSB)
First Message Character
(Beginning of Message)
2
2
3
4
Other Message Characters from left to right
5
Last Message Character
(End of Message)
➀
➁
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
12–4 Communicating with a PLC-5 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
1 - Poll
1 - Response
2 - Poll
2 - Response
3 - Poll
3 - Response
Message Data
-
No Message Sent
-
Message 1 Sent
-
Message 2 Sent
DeviceNet
Output #16
DeviceNet
Input #8
OFF (0)
OFF (0)
ON (1)
ON (1)
OFF (0)
OFF (0)
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Note: The following ladder logic program is for reference only.
Application specific interlocks may be necessary.
12–5
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
12–6 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
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 of the data read 3000. Data is actually 0300.
All data is byte swapped.
N23:50
N23:60
N23:70
N23:80
N23:90
N23:100
N23:110
N23:120
N23:130
N23:140
N23:150
1771-SDN to AdaptaScan Interface
Data Table
Address Data (Radix = ASCII)
N23:0 \00\00 \80\01
N23:10
N23:20
N23:30
N23:40
\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\04
\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
3 0
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
Processor File :MASTER.ACH
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
\00\00
0 0
\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\00
Data Table File N23
\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
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 Processor File: MASTER.ACH
Address
N22:0
Data (Radix=BINARY)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
N22:1
N22:2
N22:3
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Data Table File N22
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Configuring the DeviceNet
Scanner
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 12–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
12–7
Publication 2755-6.8
12–8 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
4. Double-click the 1771-SDN Scanner Module to open the
1771-SDN Module and Channel Configuration dialog.
5. Set the following PLC Interface Addresses. All other default values can remain the same.
BXfer 62
Input
N23:0
Output
N22:0
The PLC ladder logic uses these addresses in the Block Transfer
Read (N23:0) and Block Transfer Write (N22:0) instructions.
The SDN scanner maps data from the AdaptaScan Reader to its
62 word file. This selection maps data to the N23 file in the PLC.
The BTW instruction writes data from the N22 file to the 62 word file in the SDN scanner.
If you are using an AdaptaScan with v7.0 firmware on a network with 2 or more 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.
Note: Version 8.0 of the AdaptaScan Offline Programming
Software and firmware minimizes DeviceNet polling interruption of scanning.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
6. Click the Edit Scan List button to open the Scan List Editor.
12–9
7. Select A03 and click the Edit I/O Parameters button.
8. Edit the following parameters in the Edit Device I/O Parameters dialog:
•
Under I/O Type, select the Polled check box.
•
In the Poll Rx Size box, type 8 (Bytes)
•
In the Poll Tx Size box, type 1 (Bytes)
•
From the Poll Rate list box, select Every Scan.
The dialog should look like this:
9. Click OK to return to the Scan List Editor dialog.
Node 3 (AdaptaScan) is enabled and will be polled by the SDN scanner. The SDN scanner will expect 8 bytes of data (4 characters + 4 bytes of overhead) and will transmit 1 byte of data back to the module (BTW N22:1).
Publication 2755-6.8
12–10 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
10. Click the Datatable Map button to open the Datatable Map dialog.
The dialog shows the data table map of the N23 file. The data from the AdaptaScan Reader is mapped to the PLC (BTR N23).
•
Word 0 is reserved
•
4 words (8 bytes) are mapped for the incoming string from the
AdaptaScan Reader.
•
Bit 15 is the ‘new message being sent’ bit.
11. Click the Data Entry button.
12. Change Map Data From to Poll Message.
13. Change Map Data To Block Transfer 62.
14. Change N23:0 to 1.
15. Change No. Bits to 64.
16. Click Apply Segment.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging 12–11
17. Next to Data Map, select Output to view the output file (N22).
The dialog shows the data table map for the N22 file. The data map represents data sent to the AdaptaScan Reader through the
SDN Scanner (BTW N22)
•
Word 1 writes one byte of data to the module.
•
Bit 7 of word 1 is the ‘send next message’ bit.
18. Change Map Data From to Poll Message.
19. Change Map Data To Block Transfer 62.
20. Change N22:0 to 1.
21. Change No. Bits to 8.
22. Click Apply Segment button.
23. Click Close to return the Scan List Editor dialog.
24. Click the Save To File button and then the Save to SDN button to download the scan list the 1771-SDN Scanner.
Important: Before clicking the Save to SDN button , the
SDN Scanner must be in Idle Mode. Set bit 0 of word 0 in the BTW N22 file to 0 (N22:0/0=0).
Another way to place the SDN Scanner in Idle
Mode is to put the PLC into Program Mode.
Publication 2755-6.8
12–12 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Configuring the Reader This section shows how to configure the AdaptaScan Bar Code
Reader using AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• scan/decode 4 character, Interleaved 2 of 5 labels
• define a DeviceNet address
• configure the scanner
• configure the decoder trigger
• configure the format of messages and the message destination
Create a New Project
Create a new project named PLC DeviceNet Master/Slave for one
AdaptaScan Bar Code Reader (Bar Code Reader 1).
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
Publication 2755-6.8
3. Choose Edit from the Project menu to rename the project PLC
DeviceNet Master/Slave.
If you need to change the baud rate, proceed to the next section.
If you do not need to change the baud rate, proceed to step 4.
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging 12–13
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Change the Baud Rate
If you need to change the baud rate:
1. Click on the K Baud button and select the desired baud rate.
2. Click Save and Close to return to the Project dialog.
3. Click the Device button.
4. Click Apply if the desired baud rate is shown.
5. Click Save and Close to return to the Project dialog.
6. Click the Send Device button.
Publication 2755-6.8
12–14 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
4. From the Symbology list, select Interleaved 2 of 5.
5. Under Lengths, select the Length 1 check box and then type 4 in the Through box. This indicates a 4 character length for
Interleaved 2 of 5 labels.
6. Click OK until you return to the Bar Code Labels dialog.
7. Click Save and then Close to return to the Project dialog.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
12–15
2. Set the DeviceNet address to 3.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Publication 2755-6.8
12–16 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Configure the Decoder Trigger
To test the application, use the Timer to trigger the reader’s decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Create a Message
This section defines the content of messages sent to the 1771-SDN
Scanner.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
Publication 2755-6.8
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
5. Click the New button to create a message field.
12–17
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Label & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
9. Click the Edit button to open the Message Field Edit dialog.
10. Under Replacement Strings, type nr in the Fail: field.
Bar code data is sent to the 1771-SDN Scanner on a valid read; the Fail string sends the characters nr when a no read occurs.
11. Under Data Format, type 4 in the Length box.
Important: The Length must match the number of characters in the bar code symbol. This application uses 4 character, Interleaved 2 of 5 symbols.
12. Click OK to return to the Message Field dialog.
13. Click OK to return to the Message dialog.
Publication 2755-6.8
12–18 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Define the Message Format
The section defines the format and destination of the messages sent from the reader.
1. Click the Format button from the Message dialog.
Sending the Configuration to the Reader
Running the Application
2. Under Message Destination, select DeviceNet.
3. Accept the defaults for all other parameters.
4. Click OK to return to the Message dialog.
5. Click Save and then Close to return to the main Project dialog.
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Use the Monitor dialog to verify the decoding of bar code labels.
If the:
•
AdaptaScan Reader is configured correctly
•
1771-SDN Scanner is configured correctly
• ladder program is entered as shown in this application you will see bar code data or ‘nr’ in the PLC BTR (N23) file.
Remember that all data is byte swapped.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Explicit Message Program
Control
12–19
Use the Explicit Message Program Control feature to configure device parameters on your DeviceNet network via the ladder logic program in the PLC-5 processor that is controlling these devices.
You can use Explicit Message Program Control only with devices that are slaves of your 1771-SDN Scanner Module. These slave devices must be mapped in the scanner module’s scan list.
Use the Explicit Message Program Control feature to:
• transmit configuration data from your scanner module to its slave devices on your DeviceNet network
• receive status and diagnostics from these devices on your
DeviceNet network
• make runtime adjustments to device parameters according to changing conditions detected by your processor
Publication 2755-6.8
12–20 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Explicit Message Program Control Feature
5
Block Transfer Write file (64 words)
(sent from processor to scanner module)
4
Block Transfer Read file (64 words)
(sent from scanner module to processor)
Explicit Message – A message used to transmit commands, data, requests for data or responses. The message is sent from a client on the DeviceNet network to a server on that network.
Request – An explicit message sent by a client to a server requesting the server to perform a function.
Response – An explicit message sent by a server to a client in response to the client’s request. For every request issued, there is a response.
Block Transfer Read file is completed. TXID’s are deleted and can be reused.
DeviceNet trunk line
Master’s Explicit
Request
DeviceNet drop line
AdaptaScan
Bar Code
Reader
Slave’s Explicit
Response 1203-GK5
Communication
Adapter
1305 AC drive
1. Format a Block Transfer Write file in the processor to send an
Explicit Message Request to the scanner module (download).
2. The scanner module transmits the Explicit Message Request to the slave device over the DeviceNet network.
3. The slave device transmits the Explicit Message Response back to the scanner and is queued into a block transfer buffer.
4. The processor uses a Block Transfer Read file to retrieve the
Explicit Message Response from the scanner’s buffer (upload).
5. The Block Transfer Read file is completed. The transaction IDs are deleted and can be reused.
The scanner module requires a precisely-formatted block transfer read and write size of 64 words. The Explicit Message Control table in the scanner module is 64 words. The scanner module uses the block transfer size as an indicator that the content is a client/server request.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging 12–21
Formatting the Explicit Message Transaction Block
Ten 32-word transaction blocks within the scanner module are reserved for Explicit Message Program Control. The transaction blocks accommodate both the download of Explicit Message
Requests and the upload of Explicit Message Responses.
The scanner module can accommodate one request or response for each transaction block and can transfer two blocks for each upload and download. You must format each transaction block as shown in the following figure.
Transaction
Header
(3 words)
15
TXID port service cmd/status size
MAC ID
0 word 0 word 1 word 2
Transaction Body
(29 words) word 31
One word = two bytes = 16 bits
The transaction block is divided into two parts:
•
transaction header – Contains information that identifies the transaction to the scanner and processor.
•
transaction body – In a request, this contains the DeviceNet
Class, Instance, Attribute and Service Data portion of the transaction. In a response, this contains only the response message.
Each of the data attributes in the transaction header are one byte in length:
•
command/status – For each download, you assign a command code to instruct the scanner how to administer the request.
Command Code
0
1
2
3
4
5–255
Description
Ignore transaction block (block empty).
Execute this transaction block.
Get status of transaction TXID.
Reset all client/server transactions.
Delete transaction from response queue.
Reserved
Publication 2755-6.8
12–22 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Transaction
Header
(3 words)
For each upload, the status code provides the processor with status on the device and its response.
15
TXID port service cmd/status size
MAC ID
0 word 0 word 1 word 2
Transaction Body
(29 words)
One word = two bytes = 16 bits word 31
Status Code
0
1
4
5
2
3
8
9
6
7
10
Description
Ignore transaction block (block empty).
Transaction completed successfully
Transaction in progress (not ready)
Error – slave not in scan list
Error – slave offline
Error – DeviceNet port disabled/offline
Error – transaction TXID unknown
Unused
Error – Invalid command code
Error – Scanner out of buffers
Error – Other Client/server transaction in progress
Error – could not connect to slave device
Error – response data too large for block
Error – invalid port
Error – invalid size specified
Error – connection busy
11
12
13
14
15
16–255 Reserved
•
TXID (transaction ID) – When you create and download a request to the scanner, the processor’s ladder logic program assigns a TXID to the transaction. This is a one-byte integer in the range of 1 to 255. The scanner uses this value to track the transaction to completion, and returns the value with the response that matches the request downloaded by the processor. The ladder logic program monitors rollover and usage of TXID values.
•
size – The size of the transaction body in bytes. The transaction body can be as many as 29 words (58 bytes) in length. If the size exceeds 29 words, an error code will be returned.
•
port – The DeviceNet port where the transaction is routed. The port can be zero (Channel 1) or one (Channel 2).
•
MAC ID (node address) – The DeviceNet network address of the slave device where the transaction is sent. This value can range from 0 to 63. The port and MAC ID attributes coupled together identify the target slave device. The slave device must be listed in the scanner module’s scan list and be online for the
Explicit Message transaction to be completed.
•
service – For each Explicit Message Request and Response, the service attribute contains the service request and response codes that match the corresponding request for the TXID.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging 12–23
The following figure describes the format and mapping of transaction blocks for request and response messages in the scanner module.
Transaction
Header
(3 words)
Format of 64-word Block Transfer Write
15 for Explicit Message Request
0
TXID port command size word 0 service MAC ID
Class
Instance
Attribute (optional)
Transaction #1
Transaction
Header
(3 words)
Format of 64-word Block Transfer Read for Explicit Message Response
15 0
TXID port status size word 0 service MAC ID
Transaction #1
Service Response Data
Service Data
Transaction
Header
(3 words)
TXID port service
Class
Instance command size
MAC ID
Attribute (optional) word 31 word 32
Transaction #2
Transaction
Header
(3 words)
TXID port service command size
MAC ID word 31 word 32
Transaction #2
Service Response Data
Service Data word 63 word 63
How the Processor and Scanner Module Manage Messages
Block transfer operations between the processor and the scanner always originate in the processor. The scanner module can only wait for the processor to download a transaction block to the module or request an upload of a transaction block from the module.
Once an Explicit Message Request transaction block is downloaded to the scanner module, a ladder logic program in the processor polls the scanner module for the transaction block containing the Explicit
Message Response for that request. This is done by the processor with a Block Transfer Read on the scanner module. Depending on the network load, the scanner could take a few seconds to complete the request. When a response is loaded, bit 15 of the module status register is set to 1. The program may have to poll the scanner module a number of times before the scanner returns a Response
Transaction Block.
Publication 2755-6.8
12–24 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Processor
Request
Transaction
Block
BTW
The scanner module recognizes I/O data and control as higher priorities over explicit messaging on DeviceNet.
Message lengths and slave device types impact transaction message completion times. If the processor has queued multiple Explicit
Message Transactions to the scanner module for multiple slave devices, the transactions with the slaves may not complete in the order in which the requests were received. The slave responses are queued to the 64 word Block Transfer Read in the order in which they are received. As response transaction blocks are uploaded, the processor’s program matches the responses to the requests using the
TXID field.
Scanner Module DeviceNet Network
Request
Transaction
Blocks
Scanner
Request
Queue
Ladder Scans
Response
Transaction
Block
BTR
Execute
Process Requests and Responses
Done or
Error-detected
Response
Transaction
Blocks
Scanner
Response
Queue
DeviceNet
Explicit Message
Requests and
Responses
Slave
Device
Explicit Message Program Control Limitations
•
The processor is always the DeviceNet client and the slave is always the DeviceNet server.
•
A maximum of 10 Explicit Message Request Transaction Blocks with the execute command can be queued to the scanner module at any time. For example, 5 Block Transfer Write files containing two transactions each, can be performed at any time. The scanner module receives and deletes any additional client/server requests with the execute command over the maximum of 10.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging 12–25
As transactions are removed from the queue and response transaction blocks are returned to the processor, additional transaction blocks can be issued in their place, as long as the total does not exceed ten.
•
The scanner module supports two transaction blocks per upload and download.
•
Request Transaction Blocks can only be queued for slave devices of the scanner module and must appear in the scanner module’s scan list.
•
If a slave device is not communicating at the time the scanner module processes its Request Transaction Block, the scanner module will return an error status for that transaction.
•
At a minimum, the scanner module supports the following
DeviceNet services in Request Transaction Blocks.
Service Name Service Code
Get_Attribute_Single 0E hex
Set_Attribute_Single 10 hex
Get_Attribute_All
Set_Attribute_All
01 hex
02 hex
Example
Upload a single parameter value from a device
Download a single parameter value to a device
Upload all parameter values from a device
Download all parameter values to a device
•
Continuous Block Transfers of 64 words are not supported.
•
All transaction blocks are processed, therefore, any unused transaction blocks must be left blank.
•
Client/Server commands and requests with transaction IDs that are in use are deleted by the scanner module.
•
If a slave device returns a DeviceNet error in response to the request downloaded from the processor, the scanner recognizes the error as a successful transaction (status code =1).
A failure to respond to the request within the number of retries or timeout period specified for the Explicit Message Connection is recognized by the scanner module as an error. The error code is returned in the status attribute of the transaction header.
Publication 2755-6.8
12–26 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Explicit Messaging Ladder Logic Program
This section provides the explicit message ladder logic program and data monitor results.
Enable Rung B3:0 to initiate the download process to the AdaptaScan. File N20:0 contains the APM command. The DeviceNet address being written to, in this example, is 10 or 0AH. The N7 inputs are needed if the code from page 12–5 is used.
]
B3
[
0
B3
[
ONS
]
2
N7:0
] / [
15
N7:100
] / [
15
BTW
Rack
Group
Module
Ctrl Block
Data file
Length
Continuous
00
0
0
N7:200
N20:0
64
N
After BTW is complete, initiate the the BTR statement to retrieve the response code. The N7 inputs are needed if the code from page 12–5 is used.
]
B3
[
1
B3
[
ONS
]
3
N7:0
] / [
15
N7:100
] / [
15
Rack
Group
Module
BTR
Ctrl Block
Data file
Length
Continuous
00
0
0
N7:150
N25:0
64
N
Note: You can write code to continuously change the TXID for the next transaction. Refer to page 12–21 for information regarding formatting the explicit message transaction block
Example Data Tables
Address Data = Hex Code (matchcode download of 0300 data)
N20:0 0101 000C 1003 00CE 0001 0003 0004 3330 3030
Address
N25:0
Response File (good response)
0101 900C
Address Data = Hex Code (Turn on LED 1)
N20:0 0101 0008 1003 00C9 0002 0003 0001
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging 12–27
Notes on using Explicit Messaging
•
You can send messages sequentially from the PLC-5 to different bar code readers, but the response will not update properly (when the response is read in N25:0).
•
The TXID byte does not need to be incremented, although you may not know where the response came from.
•
To receive the correct response from the command sent from the
PLC-5 you must:
1. Send command down, matchcode download (TXID=11).
2. Send a 03 in the status command. Refer to page 12–21 for more information.
3. Increment TXID to 12.
4. Send command down, turn on LED 1 (TXID=12).
5. View N25:0 for response to step 4.
6. Confirm that TXID=12. If your response is 90, the command was sent correctly. If you receive a 94, the command was not sent correctly.
•
If an incorrectly formatted command is sent from the PLC-5, you must send a 03 in the status command byte in order for the system to operate properly.
Publication 2755-6.8
12–28 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Troubleshooting Your
Module
Channel 1
Top part of module
Module Status
Indicator
Network Status
Indicator
The bicolor (green/red) module status indicator displays device status. The LED indicates whether the device has power and is functioning properly.
If the Module LED is
Off
Solid green
Flashing green
Flashing red
Solid red this indicates Take this action there is no power applied to the module.
the module is operating in normal condition.
Apply power.
None the module is not configured.
Configure the module.
there is invalid configuration.
Check configuration setup and verify dip switch settings.
the module has an unrecoverable fault.
Replace the module.
Channels 1 and 2 each have a bicolor (green/red) network status indicator. The following table provides troubleshooting information about the Channel 1 and 2 communication links.
Off
If the NET indicator is
Flashing green
Solid green
Solid red
Flashing red this indicates the channel is disabled for
DeviceNet communication.
Take this action
Power-up the module, provide network power to channel, and be sure channel is enabled in both the module configuration table and module command word.
the channel is enabled but no communication is occurring.
all slave devices in the scan list table are communicating normally with the module.
Configure scan list table for channel to add devices.
None.
the module may be defective.
Reset module. If failures continue, replace module.
at least one of the slave devices in the module’s scan list table has failed to communicate with the module.
The network has faulted.
Examine the failed device and the scan list table for accuracy.
Publication 2755-6.8
Top part of module
Channel 1
Node Address /
Status Indicator
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging 12–29
Your 1771-SDN Scanner Module has a node address/status indicator that uses numeric displays to indicate diagnostic information about your module. The display flashes at approximately 1 second intervals, depending on network traffic. The following table summarizes the meanings of the numeric codes.
Numeric Code
Network Address
Displays 0 - 63
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
88
Indicates normal operation. The numeric display matches the scanner’s node address on the DeviceNet network.
module failed Duplicate Node Address check.
None.
Take this action illegal data in scan list table (node number alternately flashes).
slave device stopped communicating (node number alternately flashes).
device key parameters do not match scan list table entry (node number alternately flashes).
data overrun on port detected.
Change the module channel address to another available one. The node address you selected is already in use on that channel.
Reconfigure the scan list table and remove any illegal data.
Inspect the field devices and verify connections.
no network traffic has been detected.
no direct network traffic for module detected.
data size expected does not match scan lists entry (node number alternately flashes).
slave device in scan list table does not exist
(node number alternately flashes).
module has failed to transmit a message.
module is in IDLE mode.
module is in FAULT mode.
error detected in sequence of fragmented I/O messages from device (node number alternately flashes).
slave device is returning error responses when module attempts to communicate with it (node number alternately flashes).
module is initializing the DeviceNet channel.
Modify your configuration and check for invalid data. Check network communication traffic.
Verify connections.
None. The module hears other network communication.
Reconfigure your module for the correct transmit and receive data sizes
Add the device to the network, or delete the scan list entry for that device.
Make sure that your module is connected to a valid network. Check for disconnected cables.
Place PLC-5 in Run mode.
Check ladder program for cause of fault bits.
Check scan list table entry for slave device to make sure that input and output data lengths are correct. Check slave device configuration.
Check accuracy of scan list table entry. Check slave device configuration. Slave device may be in another master’s scan list. Reboot slave device.
None. This code clears itself once module attempts to initialize all slave devices on the channel.
Configure device for smaller data size.
data size returned is bigger than 255 bytes
(node number alternately flashes).
device is producing idle state data while the scanner is in Run Mode.
this is not an error. At power-up and reset, the module displays all 14 segments of the node address and status display LEDs.
Table continued on the next page.
Enter a matching scan list device ID.
Check device configuration/slave node status.
None.
Publication 2755-6.8
12–30 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Numeric Code
90
Indicates user has disabled communication port
91 bus-off condition detected on comm port.
module is detecting communication errors.
92 no network power detected on comm port.
95
97
98
99 application FLASH update in progress.
module halted by user command.
Unrecoverable firmware failure.
Unrecoverable hardware failure.
Take this action reconfigure your module. Check the disable bit in the Module Command Register.
Check DeviceNet connections and physical media integrity. Check system for failed slave devices or other possible sources of network interference.
Provide network power. Make sure that module drop cable is providing network power to module comm port.
None. Do not disconnect the module while application FLASH is in progress. You will lose any existing data in the module’s memory.
Check ladder program for cause of fault bits.
Service or replace your module.
Service or replace your module.
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging 12–31
Downloading Other Host
Commands
Read Performance Indicator Command
Packet Contents
DeviceNet Address
Get Performance Request
Class
Instance Number (LSB)
Instance Number (MSB)
*3F = Address 63, modify as required
Data Sent
3F*
4C
C8
01
00
You can download other host commands using the same procedures described in the match code example. The following tables provide the commands and responses for the other host commands (all values are hexadecimal).
Read Performance Indicator Response
Packet Contents
DeviceNet Address
Get Performance Response
Data (LSB)
Data (MSB)
Response
3F
CC
01
00
Reset Package Counter Response
Packet Contents
DeviceNet Address
Set Attribute Response
Response
3F
90
Reset Package Counter Command
Packet Contents
DeviceNet Address
Set Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number–
Reset Counters
Data
*3F = Address 63, modify as required
Data Sent
3F*
10
D2
00
00
09
01
Read Match Counters Command
Packet Contents
DeviceNet Address
Get Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number
*3F = Address 63, modify as required
Data Sent
3F*
0E
CE
01
00
08
Read Package Counters Command
Packet Contents
DeviceNet Address
Get Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number–
Match Count
*3F = Address 63, modify as required
Data Sent
3F*
0E
D2
01
00
08
Read Match Counters Response
Packet Contents
DeviceNet Address
Get Attribute Response
Data
Response
3F
8E
6C, 08, 00, 00
Read Package Counters Response
Packet Contents
DeviceNet Address
Get Attribute Response
Data
Response
3F
8E
6C, 08, 00, 00
Publication 2755-6.8
12–32 Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Reset Match Counters Command
Packet Contents
Response Codes
Set Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number-
Reset Counters
Data
*3F = Address 63, modify as required
Data Sent
3F*
10
CE
00
00
0B
01
Read Message Command
Packet Contents
DeviceNet Address
Get Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number - Message
*3F = Address 63, modify as required
Data Sent
3F*
0E
CC
00
00
14
Read LED Status Command
Packet Contents
DeviceNet Address
Read LEDS Request
Class
Instance Number (LSB)
Instance Number (MSB)
*3F = Address 63, modify as required
Data Sent
3F*
43
CB
01
00
Reset Match Counters Response
Packet Contents
DeviceNet Address
Set Attribute Response
Response
3F
90
Read Message Response
Packet Contents
DeviceNet Address
Get Attribute Response
Data (LSB)
Data (MSB)
ASCII Message Data
ASCII Message Data
ASCII Message Data
ASCII Message Data
* Example data = 0200
Response
3F
8E
04
00
30*
32
30
30
Read LED Status Response
Packet Contents
3F
Read LEDS Response
I/O 1
I/O 2
Trigger / Read
On Symbol
Response
3F
C3
See Table Next Page
See Table Next Page
See Table Next Page
See Table Next Page
Laser On
Module
Network
See Table Next Page
See Table Next Page
See Table Next Page
Publication 2755-6.8
Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging
Set Output Timer Command
Packet Contents
DeviceNet Address
Set Attribute Request
Class
Instance Number (LSB)
Instance Number (MSB)
Attribute Number - Max Time
Data (LSB)
Data (MSB)
*3F = Address 63, modify as required
** Time in milliseconds
Data Sent
3F*
10
D0
02
00
09
FA
00
Set Output Timer Response
Packet Contents
DeviceNet Address
Set Attribute Response
Response
3F
90
12–33
Byte
2
3-5
0-2
3-5
Bits
0-2
3-5
0-2
0-2
3-5
LED Indicator
I/O 1
I/O 2
TRIGGER / READ
ON SYMBOL
LASER ON
MODULE
NETWORK
LED Status Response
Data at Indicated Bit Address = LED State
0 = Off 1 = Yellow 2 = Green 3 = Red
4 = Not
Used
5 = Flash
Yellow
OFF ON
OFF
No
Trigger
Not Reading
OFF
ON
Triggered
Reading
ON
Valid
Read
Read
<100%
No Power
Device
OK
DeviceNet
OK
Hardware
Fault
DeviceNet
Fault
6 = Flash
Green
7 = Flash
Red
Power Up
Established
Minor
Fault
No
Response
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Communicating with a
2760ĆRB Module over an
RSĆ232 Link
This application describes how to connect and configure an
AdaptaScan Bar Code Reader to the 2760-RB interface module via
“dumb terminal protocol” RS-232, using the 2760-SFC1 or -SFC2 protocol cartridge.
The application includes cable diagrams and configuration information for the AdaptaScan readers. It also includes a sample
PLC-5 program which is needed to establish communication from the PLC-5 processor to the 2760-RB module.
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
•
2760-RB Interface Module
•
1771 chassis
•
PLC-5 processor
•
2760-SFC1 or -SFC2 protocol cartridge
• appropriate cables to program the PLC-5 and to configure the
2760-RB module and bar code reader.
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for computer with a 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
• terminal emulation software to program the 2760-RB module
•
PLC-5 Programming Software
Publication 2755-6.8
13–2 Communicating with a 2760-RB Module over an RS-232 Link
Related Publications Publications you might want to refer to include:
Publication
2755-837
2755-838
2760-ND001
2760-ND003
2760-822
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
2760-RB Interface Module User Manual
2760-SFC1 Protocol Cartridge User Manual
2760-SFC2 Protocol Cartridge User Manual
In addition, you may want to refer to the PLC-5 Hardware and
Software User Manuals.
PLC-5 Compatibility
Refer to the following table for hardware compatibility in this application example.
Interface Module type
Series A, Rev. G or below
Series A, Rev. H or above with the following PLC-5 type
PLC-5, -15, -25, etc.
New Generation PLC-5
(Series A, Rev. C or above) program on page 13–6.
Refer to the sample PLC-5 program on page 13–6.
(Set BT compatibility bit
S26/4 while in program mode.)
Refer to the sample PLC-5 program on page 13–7.
(Add ladder logic using IIN update of RB. BTR must be before BTW.)
Connecting the RB Module to the Reader
The 2760-RB configuration example includes sample configuration screens and DIP switch settings needed to establish communication with the AdaptaScan Reader via RS-232.
Dip Switch Side View
Switch pushed toward top (off position).
Switch pushed toward bottom (on position).
Publication 2755-6.8
Communicating with a 2760-RB Module over an RS-232 Link 13–3
Classic PLC-5 Processor DIP Switches
SW-1
SW-2
SW-3
1 on on on
2 on on on
3 on on off
Switch Lever #
4 5 on on on off on
6 on
7 on on on
Not Applicable
8 off off
SW-1
SW-2
Enhanced PLC-5 Processor DIP Switches
1 on on
2 on on
3 on on
4 on off
Switch Lever #
5 6 on on off on
7 on on
8 on off
9 on on
10 off off
I/O Chassis Backplane DIP Switches
1 off
2 off
3 off
Switch Lever #
4 5 off off
6 on
7 off
8 off
2760-RB Module DIP Switches
SW-1
SW-2
SW-3
SW-4
1 off off off off
2 off off off off
3 off off off on
Switch Lever #
4 5 off off off off off off
6 off off ot licable
7 off off
8 off off
Publication 2755-6.8
13–4 Communicating with a 2760-RB Module over an RS-232 Link
The 2760-RB module is placed in the 1771 chassis in slot 0 next to the PLC. For this application, the AdaptaScan Reader communicates through port 1 on the 2760-RB. A 1771-ASB module can also be used to communicate with the 2760-RB module over the chassis backplane to Remote I/O.
Protocol Cartridge
(Catalog No. 2760-SFC1 or -SFC2)
ASCII (Dumb) Terminal
AdaptaScan
Bar Code Reader
RS-232
Flexible Interface Module
(Catalog No. 2760-RB)
Publication 2755-6.8
Communicating with a 2760-RB Module over an RS-232 Link 13–5
Cabling
Cable 1 must be constructed to connect a configuration terminal to the 2760-RB Module Configuration port.
Cable 2 must be constructed to connect the RS232/422 port of the bar code reader wiring base to Port 1 on the 2760-RB module. Refer to following cabling diagrams.
Cable 1
2760-RB
(config. port)
25-pin D male
Tx 2
Rx 3
GND 7
Dumb Terminal
(VT-1000)
25-pin D female
3 Rx
2 Tx
7 GND
Cable 2
2760-RB
Port 1
25-pin D male
Tx 2
Rx 3
GND 7
AdaptaScan RS-232
Terminal Strip
RS-232
Rx
Tx
GND
Publication 2755-6.8
13–6 Communicating with a 2760-RB Module over an RS-232 Link
Configuring the PLC-5
Processor
A sample PLC program appropriate for using a PLC 5/15/25 with a
2760-RB module appears below.
| I:000 N7:0 N7:5 +–––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[––––––––+Block Transfer Read +––O––+
| 13 15 15 |Rack 0| |
| |Group 0| |
| |Module 0| |
| |Control Block N7:100+––O––+
| |Length 0| |
| |Continuous N| |
| +–––––––––––––––––––––––+ |
| |
| |
| Write |
| Data N7:0 N7:5 +–––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[––––––––+Block Transfer Write | |
| 15 15 |Rack 0| |
| |Group 0+––O––+
| |Module 0| |
| |Control Block N7:5| |
| |Data File N7:200+––O––|
| |Length 0| |
| |Continuous N| |
| +–––––––––––––––––––––––+ |
| |
Refer to your PLC-5 Instruction Reference Manual for detailed information on using the PLC-5 programming software.
Publication 2755-6.8
Configuring the 2760-RB
Interface Module
Communicating with a 2760-RB Module over an RS-232 Link 13–7
Using the 2760-RB Module, Revision H or Above, with the New
Generation PLC-5 Processor
When the 2760-RB, revision H or above, is used with the new generation PLC-5 processors in a local chassis, there is a possibility that the PLC will not see the BRR bit from the 2760-RB. For the
PLC-5 to see the BTR bit, an odd number of image scans must occur.
To ensure that the BTR instruction sees the BRR bit (bit 13) you must place an Immediate Input Instruction addressed to the BRR bit in another rung just before the Block Transfer Read (BTR) rung.
This ensures that the BRR bit is seen by the NP-5 processor.
| BRR BT7:5 BT7:25 000 |
+–––]/[–––––]/[––––––]/[–––––––––––––––( IIN )––––––––––––––––+
| |
| BTR |
| BRR BT7:5 BT7:25 +––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[–––––––––+Rack 0| |
| EN EN |Group 0| |
| |Module 0+––O––+
| |Control Block BT7:5| |
| |Data File N7:200| |
| |Length 0+––O––+
| |Continuous N| |
| +––––––––––––––––––––––+ |
| |
| |
| Write BTW |
| Data BT7:5 BT7:25 +––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[–––––––––+Rack 0| |
| EN EN |Group 0| |
| |Module 0+––O––+
| |Control Block BT7:25| |
| |Data File N7:400| |
| |Length 0+––O––+
| |Continuous N| |
| +––––––––––––––––––––––+ |
| |
| |
| |
| |
Note: BTR must come before BTW.
Refer to your PLC-5 user manual for detailed information on using the PLC-5 programming software.
The configuration screens for the 2760-RB should be entered exactly as shown. These parameters then need to be saved.
Both the bar code reader and the 2760-RB module are configured to send and recognize the Carriage Return
[Cr]
, Line Feed
[Lf] characters to identify a message. When the 2760–RB senses information entering Port 1, it will look for the Cr, Lf. When it sees these trailers, it will Block transfer read (BTR) the preceding bar code data into the PLC program.
Publication 2755-6.8
13–8 Communicating with a 2760-RB Module over an RS-232 Link
To configure the 2760-RB module:
1. Set all 2760-RB module DIP switches to Off.
2. Connect the smart cable to the Configuration port of the 2760-RB module and the serial port of the computer.
3. Send a “break sequence” to the 2760-RB module via the Terminal
Emulator:
A. Set the baud rate to 9600, 8 data bits, 1 stop bit, no parity, no flow control, and either COM1 or COM2 depending on the smart cable connection.
B. Program a function key to send the “break sequence” by using the Ctrl-Shift-Break command. (This step is specifically for Windows 3.1 Terminal Emulation.)
C. Send the break sequence to call up the 2760-RB module configuration menu.
4. Select menu item 3: Device port protocol names. Set to:
PORT1=COPYRIGHT 1989 ALLEN-BRADLEY COMPANY INC.
2760-SFC2 DT SERIES A REVISION A (YES/NO)=YES
5. Select menu item 21: Identification numbers. Select:
DUMB TERM. UNSPECIFIED PROTOCOL, 13FH (YES/NO)=YES
Publication 2755-6.8
Communicating with a 2760-RB Module over an RS-232 Link
6. Select option 11: Configuration parameters. Set to:
MODEM CONTROL (ENABLE/DISABLE)=DISABLE
9600 BITS PER SECOND (YES/NO)=YES
8 BITS NO PARITY (YES/NO)=YES
XON/XOFF (ENABLE/DISABLE)=DISABLE
RS232 (YES/NO)=YES
RECEIVE MATRIXING (ENABLE/DISABLE)=ENABLE
BYTE SWAPPING (ENABLE/DISABLE)=DISABLE
BINARY DATA NO CONVERSIONS (YES/NO)=YES
HDR/TLR ON OUTPUT (ENABLE/DISABLE)=ENABLE
HEADER BYTE LENGTH (DEC 0...4)= 0
HEADER DATA[0](HEX 0...FF)=0
HEADER DATA[1](HEX 0...FF)=0
HEADER DATA[2](HEX 0...FF)=0
HEADER DATA[3](HEX 0...FF)=0
TRAILER BYTE LENGTH (DEC 0...4)=2
TRAILER DATA[0](HEX 0...FF)=0d
TRAILER DATA[1](HEX 0...FF)=0a
TRAILER DATA[2](HEX 0...FF)=0
TRAILER DATA[3](HEX 0...FF)=0
Type save or quit to exit out of the editor.
7. Verify that the 2760-RB is in chassis 0, group 0 module 0.
8. Save the above configuration.
13–9
Publication 2755-6.8
13–10 Communicating with a 2760-RB Module over an RS-232 Link
Configuring the Reader This section shows how to configure the AdaptaScan Bar Code
Reader using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• configure a DeviceNet address
• configure a bar code label and symbol
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the content and format of messages
These procedures provide general guidelines for setting up an application. You may need to modify the configuration for your application needs.
Create a New Project
Create a new project named RB_RS232 for one AdaptaScan Bar
Code Reader (Bar Code Reader 1).
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader (Bar Code Reader
1) to the project.
Publication 2755-6.8
Communicating with a 2760-RB Module over an RS-232 Link
3. Choose Edit from the Project menu to rename the project
RB_RS232.
13–11
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
4. Select a symbology and any other parameters (Identifier, Lengths) required by your application.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
13–12 Communicating with a 2760-RB Module over an RS-232 Link
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
Communicating with a 2760-RB Module over an RS-232 Link
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
13–13
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Configure the Decoder Trigger
This application uses a Timer to trigger the reader’s decoder. The
Timer is typically used during application setup. Refer to Publication
No. 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
Publication 2755-6.8
13–14 Communicating with a 2760-RB Module over an RS-232 Link
Configure the Serial Port
1. Click the Serial Port button on the main Project dialog.
2. Verify that Terminal is selected in the Protocol list box. Also verify that the settings match the Channel 0 User settings.
3. Click the Edit button to open Terminal dialog.
4. Type \r\n in the trailer field.
Publication 2755-6.8
5. Click OK to exit the dialog.
6. Click the Save and then the Close button on the Serial Port dialog to return to the main Project dialog.
Communicating with a 2760-RB Module over an RS-232 Link 13–15
Create a Message
The Message dialogs define the format and content of message data sent to the RB module by the reader when bar codes are decoded.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to define a message field.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Labels & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
9. Click the Edit button to open the Message Field Edit dialog.
Publication 2755-6.8
13–16 Communicating with a 2760-RB Module over an RS-232 Link
10. Under Replacement Strings, type no read in the Fail: field.
Bar code data is sent to the controller on a valid read. The Fail string sends the characters “no read” when a no read occurs.
Sending the Configuration to the Reader
11. Click OK to return to the Message Field dialog.
12. Click OK to return to the Message dialog.
13. Click Save and then Close to return to the main Project dialog.
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Use the Monitor dialog to verify the decoding of bar code labels.
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Related Publications
Communicating with a
2760ĆRB Module on a DHĆ485
Network
This application describes how to connect and configure an
AdaptaScan Bar Code Reader to the 2760-RB interface module via
DH485, using the 2760-SFC2 protocol cartridge.
The application includes cable diagrams and configuration information for the AdaptaScan readers. It also includes a sample
PLC-5 program which is needed to establish communication from the PLC-5 processor to the 2760-RB module.
The hardware items required for this application are:
•
2755-SN3, -SN5 or -SN8 AdaptaScan Bar Code Reader (v7.1
firmware or later)
•
2755-NB40 or -NB41 Wiring Base
•
2755-PW46 or -PW47 Power Supply
•
2755-NC43 or -NC48 Configuration Cable
•
2760-RB Interface Module
•
1771 chassis
•
PLC-5 processor
•
2760-SFC2 protocol cartridge
• appropriate cables to program the PLC-5 and to configure the
2760-RB module and bar code reader.
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for computer with a 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
• terminal emulation software to program the 2760-RB module
•
PLC-5 Programming Software
Publications you might want to refer to include:
Publication
2755-837
2755-838
2760-ND001
2760-822
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
2760-RB Interface Module User Manual
2760-SFC2 Protocol Cartridge User Manual
In addition, you may want to refer to the PLC-5 Hardware and
Software User Manuals.
Publication 2755-6.8
14–2 Communicating with a 2760-RB Module on a DH-485 Network
PLC-5 Compatibility Refer to the following table for hardware compatibility in this application example.
Interface Module type
Series A, Rev. G or below
Series A, Rev. H or above with the following PLC-5 type
PLC-5, -15, -25, etc.
program on page 14–5.
New Generation PLC-5
(Series A, Rev. C or above)
Refer to the sample PLC-5 program on page 14–5.
(Set BT compatibility bit
S26/4 while in program mode.)
Refer to the sample PLC-5 program on page 14–6.
(Add ladder logic using IIN update of RB. BTR must be before BTW.)
Connecting the RB Module to the Reader
The 2760-RB configuration example includes sample configuration screens and DIP switch settings needed to establish communication with the AdaptaScan Reader via DH-485.
Dip Switch Side View
Switch pushed toward top (off position).
Switch pushed toward bottom (on position).
Classic PLC-5 Processor DIP Switches
SW-1
SW-2
SW-3
1 on on on
2 on on on
3 on on off
Switch Lever #
4 5 on on on on off
6 on on
Not Applicable
7 on on
8 off off
Publication 2755-6.8
Communicating with a 2760-RB Module on a DH-485 Network 14–3
SW-1
SW-2
Enhanced PLC-5 Processor DIP Switches
1 on on
2 on on
3 on on
4 on off
Switch Lever #
5 6 on on off on
7 on on
8 on off
9 on on
10 off off
I/O Chassis Backplane DIP Switches
1 off
2 off
3 off
Switch Lever #
4 5 off off
6 on
7 off
8 off
2760-RB Module DIP Switches
SW-1
SW-2
SW-3
SW-4
1 off off off off
2 off off off off
3 off off off on
Switch Lever #
4 5 off off off off off off
6 off off ot licable
7 off off
8 off off
The 2760-RB module is placed in the 1771 chassis in slot 0 next to the PLC. For this application, the AdaptaScan Reader communicates through port 1 on the 2760-RB. A 1771-ASB module can also be used to communicate with the 2760-RB module over the chassis backplane to Remote I/O.
Protocol Cartridge
(Catalog No. 2760-SFC2)
ASCII (Dumb) Terminal
AdaptaScan
Bar Code Reader
DH-485
Flexible Interface Module
(Catalog No. 2760-RB)
Publication 2755-6.8
14–4 Communicating with a 2760-RB Module on a DH-485 Network
Cabling
Cable 1 must be constructed to connect a configuration terminal to the 2760-RB Module Configuration port.
Cable 2 must be constructed to connect the RS485 port of the bar code reader wiring base to Port 1 on the 2760-RB module. Refer to following cabling diagrams.
Cable 1
2760-RB
(config. port)
25-pin D male
Tx 2
Rx 3
GND 7
Dumb Terminal
(VT-1000)
25-pin D female
3 Rx
2 Tx
7 GND
Cable 2
2760-RB
Port 1
25-pin D male
A
B
GND 7
AdaptaScan
RS-485/422 Terminal
Strip
RS-485
TxA
TxB
GND
Publication 2755-6.8
Communicating with a 2760-RB Module on a DH-485 Network 14–5
Configuring the PLC-5
Processor
A sample PLC program appropriate for using a PLC 5/15/25 with a
2760-RB module appears below.
| I:000 N7:0 N7:5 +–––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[––––––––+Block Transfer Read +––O––+
| 13 15 15 |Rack 0| |
| |Group 0| |
| |Module 0| |
| |Control Block N7:100+––O––+
| |Length 0| |
| |Continuous N| |
| +–––––––––––––––––––––––+ |
| |
| |
| Write |
| Data N7:0 N7:5 +–––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[––––––––+Block Transfer Write | |
| 15 15 |Rack 0| |
| |Group 0+––O––+
| |Module 0| |
| |Control Block N7:5| |
| |Data File N7:200+––O––|
| |Length 0| |
| |Continuous N| |
| +–––––––––––––––––––––––+ |
| |
Refer to your PLC-5 Instruction Reference Manual for detailed information on using the PLC-5 programming software.
Publication 2755-6.8
14–6 Communicating with a 2760-RB Module on a DH-485 Network
Using the 2760-RB Module, Revision H or Above, with the New
Generation PLC-5 Processor
When the 2760-RB, revision H or above, is used with the new generation PLC-5 processors in a local chassis, there is a possibility that the PLC will not see the BRR bit from the 2760-RB. For the
PLC-5 to see the BTR bit, an odd number of image scans must occur.
To ensure that the BTR instruction sees the BRR bit (bit 13) you must place an Immediate Input Instruction addressed to the BRR bit in another rung just before the Block Transfer Read (BTR) rung.
This ensures that the BRR bit is seen by the NP-5 processor.
| BRR BT7:5 BT7:25 000 |
+–––]/[–––––]/[––––––]/[–––––––––––––––( IIN )––––––––––––––––+
| |
| BTR |
| BRR BT7:5 BT7:25 +––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[–––––––––+Rack 0| |
| EN EN |Group 0| |
| |Module 0+––O––+
| |Control Block BT7:5| |
| |Data File N7:200| |
| |Length 0+––O––+
| |Continuous N| |
| +––––––––––––––––––––––+ |
| |
| |
| Write BTW |
| Data BT7:5 BT7:25 +––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[–––––––––+Rack 0| |
| EN EN |Group 0| |
| |Module 0+––O––+
| |Control Block BT7:25| |
| |Data File N7:400| |
| |Length 0+––O––+
| |Continuous N| |
| +––––––––––––––––––––––+ |
| |
| |
| |
| |
Note: BTR must come before BTW.
These parameters then need to be saved. Refer to your PLC-5 user manual for detailed information on using the PLC-5 programming software.
Configuring the 2760-RB
Interface Module
The configuration screens for the 2760-RB should be entered exactly as shown.
Both the bar code reader and the 2760-RB module are configured to send and recognize the Carriage Return [Cr] , Line Feed [Lf] characters to identify a message. When the 2760–RB senses information entering Port 1, it will look for the Cr, Lf. When it sees these trailers, it will Block transfer read (BTR) the preceding bar code data into the PLC program.
Publication 2755-6.8
Communicating with a 2760-RB Module on a DH-485 Network 14–7
To configure the 2760-RB module:
1. Set all 2760-RB module DIP switches to Off.
2. Connect the smart cable to the Configuration port of the 2760-RB module and the serial port of the computer.
3. Send a “break sequence” to the 2760-RB module via the Terminal
Emulator:
D. Set the baud rate to 9600, 8 data bits, 1 stop bit, no parity, no flow control, and either COM1 or COM2 depending on the smart cable connection.
E. Program a function key to send the “break sequence” by using the Ctrl-Shift-Break command. (This step is specifically for Windows 3.1 Terminal Emulation.)
F. Send the break sequence to call up the 2760-RB module configuration menu.
4. Select menu item 3: Device port protocol names. Set to:
PORT1=COPYRIGHT 1989 ALLEN-BRADLEY COMPANY INC.
2760-SFC2 LAN SERIES A REVISION B (YES/NO)=YES
5. Select menu item 21: Identification numbers. Select:
RS485 LAN 2755-DM6 ASCII MODE 0 H (YES/NO)=YES
6. Select option 11: Configuration parameters. Set to:
SLOT TIME (NO. CHARS) (DEC 0 ... 255) = 15
INTER-CHAR TIME (NO. CHARS) (DEC 0 ... 255) = 7
IDLE TIME (NO. CHARS) (DEC 0 ... 255) = 3
RETRIES (DEC 0 ... 255) = 3
19,200 BITS PER SECOND (YES/NO)=YES
BCD NODE NUMBERS (ENABLE/DISABLE)= ENABLE
BYTE SWAPPING (ENABLE/DISABLE)=ENABLE
RECEIVE MATRIXING (ENABLE/DISABLE)=DISABLE
MATRIX ADDRESS (HEX 0 ... FFFF) = 0
RE-ESTABLISH FREQUENCY (DEC 0 ... 255)=5
POLL FREQUENCY/DESTINATION [0] (HEX 0 ... FFFF)=5
POLL FREQUENCY/DESTINATION [1] (HEX 0 ... FFFF)=105
POLL FREQUENCY/DESTINATION [2] (HEX 0 ... FFFF)=5
POLL FREQUENCY/DESTINATION [3] (HEX 0 ... FFFF)=5
Type save or quit to exit out of the editor.
7. Verify that the 2760-RB is in chassis 0, group 0 module 0.
8. Save the above configuration.
Publication 2755-6.8
14–8 Communicating with a 2760-RB Module on a DH-485 Network
Configuring the Bar Code
Reader
This section shows how to configure the AdaptaScan Bar Code
Reader (with v7.1 firmware or later) using the AdaptaScan Software
(Catalog No. 2755-ASN).
The procedures in this section show how to:
• define the DeviceNet node address of the AdaptaScan Reader
• configure a bar code label and symbol
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the format of messages and the message destination
The steps may vary for some procedures because of the different requirements of applications. For example, the bar code labels may vary from one application to the next.
Create a New Project
Create a new project named RB_DH485 for the AdaptaScan Bar
Code Readers.
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader to the project.
Publication 2755-6.8
Communicating with a 2760-RB Module on a DH-485 Network
3. Choose Edit from the Project menu to rename the project
RB_DH485.
14–9
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
4. Select a symbology and any other parameters (Identifier, Lengths) required by your application.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
14–10 Communicating with a 2760-RB Module on a DH-485 Network
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address to 1.
Note: The DeviceNet address is not always the same as the
DH-485 node address. A DH-485 node address is assigned later.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
Communicating with a 2760-RB Module on a DH-485 Network
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
14–11
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Publication 2755-6.8
14–12 Communicating with a 2760-RB Module on a DH-485 Network
Configure the Decoder Trigger
This application uses a Timer to trigger the reader’s decoder. The
Timer is typically used during application setup. Refer to Publication
No. 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Configure the Serial Port
1. Click the Serial Port button from the Project dialog.
Publication 2755-6.8
2. Configure the serial port as follows:
•
From the Protocol list box, select DH-485
•
From the Baud Rate list box, select 19,200
•
From the Connection list box, select RS485
The configuration must match the host configuration.
Communicating with a 2760-RB Module on a DH-485 Network
3. Click the Edit button under Protocol to edit the DH-485 parameters.
14–13
Edit the parameters as follows:
•
Select Slave under Master/Slave
•
From the Node list box, select 1
This is the node address of the reader on the network.
4. Click OK to return to the Serial Port dialog.
5. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
14–14 Communicating with a 2760-RB Module on a DH-485 Network
Create a Message
Data sent from the AdaptaScan Reader to the RB module uses messages.
1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to create a message field.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Labels & Symbols, select Symbol 1.
8. Check (enable) the Match Exactly check box.
Publication 2755-6.8
Communicating with a 2760-RB Module on a DH-485 Network
9. Click the Edit button to open the Message Field Edit dialog.
14–15
10. Under Replacement Strings, type no read in the Fail: box.
Bar code data is sent to the RB module on a valid read. The Fail string sends “no read” to the controller when a no read occurs on
Bar Code Reader 1.
11. Click OK to return to the Message Field dialog.
12. Click OK again to return to the Message dialog.
Define the Message Format
1. Click the Format button from the Message dialog.
Sending the Configuration to the Reader
2. In the Trailer text box, type \r\n (for CR, LF).
3. Under Message Destination, select Serial Port.
4. Click OK to return to the Message dialog.
5. Click Save and then Close to return to the Project dialog.
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Use the Monitor dialog to verify the decoding of bar code labels.
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirements
Related Publications
Downloading Match Codes via
DH485 using a PLCĆ5
Processor and a 2760ĆRB
Module
This application describes how to download match codes to the
AdaptaScan Bar Code Reader from a PLC-5 processor via DH485 protocol, using the 2760-SFC2 protocol cartridge.
The application includes cable diagrams and configuration information for the AdaptaScan readers. It also includes a sample
PLC-5 program which is needed to establish communication from the PLC-5 processor to the 2760-RB module.
The hardware items required for this application are:
•
2755-SN3, -SN5 or -SN8 AdaptaScan Bar Code Reader (v7.1
firmware or later)
•
2755-NB40 or -NB41 Wiring Base
•
2755-PW46 or -PW47 Power Supply
•
2755-NC43 or -NC48 Configuration Cable
•
2760-RB Interface Module
•
1771 chassis
•
PLC-5 processor
•
2760-SFC2 protocol cartridge
• appropriate cables to program the PLC-5 and to configure the
2760-RB module and bar code reader.
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for computer with a 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software
• terminal emulation software to program the 2760-RB module
•
PLC-5 Programming Software
Publications you might want to refer to include:
Publication
2755-837
2755-838
2760-ND001
2760-822
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
2760-RB Interface Module User Manual
2760-SFC2 Protocol Cartridge User Manual
Publication 2755-6.8
15–2 Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
In addition, you may want to refer to the PLC-5 Hardware and
Software User Manuals.
PLC-5 Compatibility
Refer to the following table for hardware compatibility in this application example.
Interface Module type
Series A, Rev. G or below
Series A, Rev. H or above with the following PLC-5 type
PLC-5, -15, -25, etc.
program on page 15–5.
New Generation PLC-5
(Series A, Rev. C or above)
Refer to the sample PLC-5 program on page 15–5.
(Set BT compatibility bit
S26/4 while in program mode.)
Refer to the sample PLC-5 program on page 15–6.
(Add ladder logic using IIN update of RB. BTR must be before BTW.)
Connecting the RB Module to the Reader
The 2760-RB configuration example includes sample configuration screens and DIP switch settings needed to establish communication with the AdaptaScan Reader via DH-485.
Dip Switch Side View
Switch pushed toward top (off position).
Switch pushed toward bottom (on position).
Classic PLC-5 Processor DIP Switches
SW-1
SW-2
SW-3
1 on on on
2 on on on
3 on on off
Switch Lever #
4 5 on on on off on
6 on
7 on on on
Not Applicable
8 off off
Publication 2755-6.8
Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module 15–3
SW-1
SW-2
Enhanced PLC-5 Processor DIP Switches
1 on on
2 on on
3 on on
4 on off
Switch Lever #
5 6 on on off on
7 on on
8 on off
9 on on
10 off off
I/O Chassis Backplane DIP Switches
1 off
2 off
3 off
Switch Lever #
4 5 off off
6 on
7 off
8 off
2760-RB Module DIP Switches
SW-1
SW-2
SW-3
SW-4
1 off off off off
2 off off off off
3 off off off on
Switch Lever #
4 5 off off off off off off
6 off off ot licable
7 off off
8 off off
The 2760-RB module is placed in the 1771 chassis in slot 0 next to the PLC. For this application, the AdaptaScan Reader communicates through port 1 on the 2760-RB. A 1771-ASB module can also be used to communicate with the 2760-RB module over the chassis backplane to Remote I/O.
Protocol Cartridge
(Catalog No. 2760-SFC2)
ASCII (Dumb) Terminal
AdaptaScan
Bar Code Reader
DH-485
Flexible Interface Module
(Catalog No. 2760-RB)
Publication 2755-6.8
15–4 Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
Cabling
Cable 1 must be constructed to connect a configuration terminal to the 2760-RB Module Configuration port.
Cable 2 must be constructed to connect the RS485 port of the bar code reader wiring base to Port 1 on the 2760-RB module. Refer to following cabling diagrams.
Cable 1
2760-RB
(config. port)
25-pin D male
Tx 2
Rx 3
GND 7
Dumb Terminal
(VT-1000)
25-pin D female
3 Rx
2 Tx
7 GND
Cable 2
2760-RB
Port 1
25-pin D male
A
B
GND 7
AdaptaScan
RS-422/485 Terminal
Strip
RS-485
TxA
TxB
GND
Publication 2755-6.8
Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module 15–5
Configuring the PLC-5
Processor
A sample PLC program appropriate for using a PLC 5/15/25 with a
2760-RB module appears below.
| I:000 N7:0 N7:5 +–––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[––––––––+Block Transfer Read +––O––+
| 13 15 15 |Rack 0| |
| |Group 0| |
| |Module 0| |
| |Control Block N7:100+––O––+
| |Length 0| |
| |Continuous N| |
| +–––––––––––––––––––––––+ |
| |
| |
| Write |
| Data N7:0 N7:5 +–––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[––––––––+Block Transfer Write | |
| 15 15 |Rack 0| |
| |Group 0+––O––+
| |Module 0| |
| |Control Block N7:5| |
| |Data File N7:200+––O––|
| |Length 0| |
| |Continuous N| |
| +–––––––––––––––––––––––+ |
| |
Refer to your PLC-5 Instruction Reference Manual for detailed information on using the PLC-5 programming software.
Publication 2755-6.8
15–6 Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
Using the 2760-RB Module, Revision H or Above, with the New
Generation PLC-5 Processor
When the 2760-RB, revision H or above, is used with the new generation PLC-5 processors in a local chassis, there is a possibility that the PLC will not see the BRR bit from the 2760-RB. For the
PLC-5 to see the BTR bit, an odd number of image scans must occur.
To ensure that the BTR instruction sees the BRR bit (bit 13) you must place an Immediate Input Instruction addressed to the BRR bit in another rung just before the Block Transfer Read (BTR) rung.
This ensures that the BRR bit is seen by the NP-5 processor.
| BRR BT7:5 BT7:25 000 |
+–––]/[–––––]/[––––––]/[–––––––––––––––( IIN )––––––––––––––––+
| |
| BTR |
| BRR BT7:5 BT7:25 +––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[–––––––––+Rack 0| |
| EN EN |Group 0| |
| |Module 0+––O––+
| |Control Block BT7:5| |
| |Data File N7:200| |
| |Length 0+––O––+
| |Continuous N| |
| +––––––––––––––––––––––+ |
| |
| |
| Write BTW |
| Data BT7:5 BT7:25 +––––––––––––––––––––––+ |
+–––] [–––––]/[––––––]/[–––––––––+Rack 0| |
| EN EN |Group 0| |
| |Module 0+––O––+
| |Control Block BT7:25| |
| |Data File N7:400| |
| |Length 0+––O––+
| |Continuous N| |
| +––––––––––––––––––––––+ |
| |
| |
| |
| |
Note: BTR must come before BTW.
Refer to your PLC-5 user manual for detailed information on using the PLC-5 programming software.
Configuring the 2760-RB
Interface Module
The configuration screens for the 2760-RB should be entered exactly as shown. These parameters then need to be saved.
Both the bar code reader and the 2760-RB module are configured to send and recognize the Carriage Return
[Cr]
, Line Feed
[Lf] characters to identify a message. When the 2760–RB senses information entering Port 1, it will look for the Cr, Lf. When it sees these trailers, it will Block transfer read (BTR) the preceding bar code data into the PLC program.
Publication 2755-6.8
Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module 15–7
To configure the 2760-RB module:
1. Set all 2760-RB module DIP switches to Off.
2. Connect the smart cable to the Configuration port of the 2760-RB module and the serial port of the computer.
3. Send a “break sequence” to the 2760-RB module via the Terminal
Emulator:
G. Set the baud rate to 9600, 8 data bits, 1 stop bit, no parity, no flow control, and either COM1 or COM2 depending on the smart cable connection.
H. Program a function key to send the “break sequence” by using the Ctrl-Shift-Break command. (This step is specifically for Windows 3.1 Terminal Emulation.)
I. Send the break sequence to call up the 2760-RB module configuration menu.
4. Select menu item 3: Device port protocol names. Set to:
PORT1=COPYRIGHT 1989 ALLEN-BRADLEY COMPANY INC.
2760-SFC2 LAN SERIES A REVISION B (YES/NO)=YES
5. Select menu item 21: Identification numbers. Select:
RS485 LAN 2755-DM6 ASCII MODE 0 H (YES/NO)=YES
6. Select option 11: Configuration parameters. Set to:
SLOT TIME (NO. CHARS) (DEC 0 ... 255) = 15
INTER-CHAR TIME (NO. CHARS) (DEC 0 ... 255) = 7
IDLE TIME (NO. CHARS) (DEC 0 ... 255) = 3
RETRIES (DEC 0 ... 255) = 3
19,200 BITS PER SECOND (YES/NO)=YES
BCD NODE NUMBERS (ENABLE/DISABLE)= ENABLE
BYTE SWAPPING (ENABLE/DISABLE)=ENABLE
RECEIVE MATRIXING (ENABLE/DISABLE)=DISABLE
MATRIX ADDRESS (HEX 0 ... FFFF) = 0
RE-ESTABLISH FREQUENCY (DEC 0 ... 255)=5
POLL FREQUENCY/DESTINATION [0] (HEX 0 ... FFFF)=5
POLL FREQUENCY/DESTINATION [1] (HEX 0 ... FFFF)=105
POLL FREQUENCY/DESTINATION [2] (HEX 0 ... FFFF)=5
POLL FREQUENCY/DESTINATION [3] (HEX 0 ... FFFF)=5
Type save or quit to exit out of the editor.
7. Verify that the 2760-RB is in chassis 0, group 0 module 0.
8. Save the above configuration.
Publication 2755-6.8
15–8 Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
Configuring the Bar Code
Reader
This section shows how to configure the AdaptaScan Bar Code
Reader (with v7.1 firmware or later) using the AdaptaScan Software
(Catalog No. 2755-ASN).
The procedures in this section show how to:
• define the DeviceNet node address of the AdaptaScan reader
• configure a bar code label and symbol
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the format of messages and the message destination
The steps may vary for some procedures because of the different requirements of applications. For example, the bar code labels may vary from one application to the next.
Create a New Project
Create a new project named Downloading Match Code for the
AdaptaScan Bar Code Readers.
1. Choose New from the Project menu to create a new project.
2. Click the New button to add a bar code reader to the project.
Publication 2755-6.8
Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
3. Choose Edit from the Project menu to rename the project
Downloading Match Code.
15–9
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Define the Bar Code Label
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
4. Select a symbology and any other parameters (Identifier, Lengths) required by your application.
5. Click OK until you return to the Bar Code Labels dialog.
6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
15–10 Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address to 63.
Note: The DeviceNet address is not always the same as the
DH-485 node address. A DH-485 node address is assigned later.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
Publication 2755-6.8
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module 15–11
Configure the Decoder Trigger
This application uses a Timer to trigger the reader’s decoder. The
Timer is typically used during application setup. Refer to the
AdaptaScan Bar Code Readers User Manual (Publication No.
2755-837) for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Timer from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Publication 2755-6.8
15–12 Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
Configure the Serial Port
1. Click the Serial Port button from the Project dialog.
2. Configure the serial port as follows:
•
Check (enable) the Scanner Protocol check box
•
From the Protocol list box, select DH-485
•
From the Baud Rate list box, select 19,200
•
From the Connection list box, select RS485
The configuration must match the host configuration.
3. Click the Edit button under Protocol to edit the DH-485 parameters.
Publication 2755-6.8
Edit the parameters as follows:
•
Select Slave under Master/Slave
•
From the Node list box, select 2
This is the node address of the reader on the network.
4. Click OK to return to the Serial Port dialog.
5. Click Save and then Close to return to the main Project dialog.
Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module 15–13
Configure for Match Codes
1. Click the Match Table button to open the Match Table dialog.
2. Click the New button to open the Match Function dialog and create a Match Function.
3. Under Function, select Match Entry.
Match Entry specifies that a match occurs whenever decoded bar code data matches the Rule: entry.
4. Under Symbol Source, select Bar Code Reader 1.
5. Under Bar Code Labels and Symbols, select Symbol 1.
6. Click the Match Exactly box.
Match Exactly specifies that ASCII characters are matched instead of a metacharacter rule.
Publication 2755-6.8
15–14 Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
7. Click the Outputs button to specify which output activates when a match occurs.
8. Under Available Outputs, select Discrete Input/Output 1.
9. Click the Add>> button to add this selection to the Output To: area.
10. Click OK to return to the main Match Table dialog.
Configure for a Package
1. Click the Package button to open the Package dialog.
Publication 2755-6.8
2. Click the new button to create a Package.
3. Under Mode, select No-Read or No-Match.
This mode is used to determine when a label is not read or does not match the rule defined in the Match function.
4. Highlight Match 1 to enable the Match function.
5. Click OK to return to the main Package dialog.
Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
Configure for an Output
1. Click the Output To button to specify which output activates when a No-Read or No-Match occurs.
15–15
Sending the Configuration to the Reader
2. Under available Outputs, select Discrete Input/Output 2.
3. Click the Add>> button to add this selection to the
Output To: area.
4. Click OK to return to the main Match Table dialog.
5. Click Save and Close to return to the main Project dialog.
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader.
Use the Monitor dialog to verify the decoding of bar code labels.
Publication 2755-6.8
15–16 Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
Downloading Match Codes To download match codes from the RB module you must:
1. Use PLC command files to send the match codes.
2. Convert the match string to hex.
3. Send the data packet (containing the string) to the reader.
PLC Command Files
Description
Byte count length. Use the
BCD/HEX screen to enter the byte count length.
Source 05 and destination is
01. Refer to Bulletin 2760
RS-485 LAN Master/Slave
Protocol User’s Manual
(Publication No. 2760-822) for more information.
LSAP equals 80 and DH485
Node equals 1. Refer to
Bulletin 2760 RS-485 LAN
Master/Slave Protocol User’s
Manual (Publication No.
2760-822) for more information.
Data packet
Data packet
Word Offset
0
1
2
3
4
High Byte No.
00
Low Byte No.
18
05
80
01
01
Data
Data
Data
Data
Convert the Bar Code String to Hex
Convert the bar code string you want to send to the reader to the hexadecimal ASCII equivalent value. For example:
Bar Code String: 0 3 0 0
Converted Hex Value: 30 33 30 30
Converted Bar Code Length Value: 0 4 0 0
In the bar code length value shown above, if the number of characters 04 were changed to 14, the hexadecimal value would be
0E. This hexadecimal value is written as 0E00.
Publication 2755-6.8
Word 0
N7:400
Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module 15–17
Place the String in the Data Packet
The bar code string is sent in a data packet having this format:
3F 10 CE 01 00 03 04 00 30 33 30 30
Instance
Number
# of Characters in Bar Code
String
Bar Code String
The following are descriptions of the data packet:
3F = DeviceNet Address (3F= 63, each reader has unique address)
10 = Set attribute (single request)
CE = 206 = Class (always 206 for match table)
01 = Instance Number (LSB)
00 = Instance Number (MSB)
03 = Attribute Number – Rule
04 = Length of String (LSB)
00 = Length of String (MSB)
30 = ASCII “0”
33 = ASCII “3”
30 = ASCII “0”
30 = ASCII “0”
Note: You can use the Windows calculator to convert decimal values to hexadecimal.
0
0018
1
0501
2
8001
Match Code String in Block Transfer Write
3
3F10
4
CE01
5
0003
6
0400
7
3033
8
3030
The response of 3F90 indicates a good write of the match code.
3F90
Address (3F = 63) Response Code (90 = Successful)
(94 = Fail)
Note: If you want to view the data after you have received the response 3F90, set up the OLP message screen. Once the message is setup, the response code will be overwritten by the bar code data.
Note: Refer to the next page for a description of the response code format and codes.
Publication 2755-6.8
15–18 Downloading Match Codes via DH485 using a PLC-5 Processor and a 2760-RB Module
You can verify whether or not a correct match code was downloaded by placing a bar code label in front of the reader so that it is scanned.
Observe the Output #1 LED on the top of the reader. When the downloaded match code matches a scanned label, the output will turn on.
If you receive a response code other than 90, refer to the the response code chart below.
Response Codes
Response codes have the following format:
Byte
0
1
2
3
Contents
Mac ID (Address)
94 = Error Response x = General Error Code x = Additional Code
General Error Codes
0C
0E
0F
11
13
14
15
16
18
19
D0-FF
Code (hex)
02
08
09
0B
10
Name
Resource unavailable
Service not supported
Invalid attribute value
Already in requested mode/state
Object cannot perform service in its current mode/state
Attribute not settable
Access permission does not allow service
Device’s mode/state does not allow object to perform service
Reply data too large
Not enough data
Attribute not supported
Too much data
Object does not exist
No stored attribute data
Store operation failure
Class specific
Publication 2755-6.8
Overview
Hardware Requirements
Software Requirement
Related Publications
Communicating with
AdaptaScan Bar Code Readers via DeviceNet PeerĆtoĆPeer
Protocol
This application describes how to connect and configure AdaptaScan
Bar Code Readers to communicate with each other over a DeviceNet network via peer-to-peer protocol.
The DeviceNet network has three nodes, each made up of an
AdaptaScan Bar Code Reader. Each reader:
• is configured the same,
• sends a different symbol to a designated serial port on any one of the readers,
• is triggered by its own package detect unit, and
• is powered by its own power supply.
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
•
DeviceNet trunk cable
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for Computer with 25-pin COM port)
The 2755-ASN AdaptaScan Offline Programming Software (v8.0 or later) is the only software requirement for this application.
Related publications include:
Publication
2755-837
2755-838
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
Publication 2755-6.8
16–2 Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Connecting to the
DeviceNet Network
The following illustration shows the nodes of the DeviceNet peer-to-peer network. Peer-to-Peer communications allows a single reader to gather data from the other readers over a DeviceNet network. The reader then transfers the data to the computer over an
RS-232 link.
Computer
Reader Reader
Reader RS-232
DeviceNet
Connecting a Power
Supply to a Reader
In the illustration the next page, each reader is powered by a separate
Catalog No. 2755-PW46 or -PW47 power supply. The Catalog No.
2755-PW46 is shown. Do not connect power supplies in parallel.
Use a shielded cable (Belden 9316 recommended) when making power connections.
Note: You must ground V- to Earth Ground at a single point on the power supply link, preferably as near the power supply as possible.
Ensure that the V+ lines are not connected together and that the V– lines are connected together as shown on top of next page.
Publication 2755-6.8
Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Reader 1 Reader 2 Reader 3
16–3
Other
DeviceNet
Devices
Ground V- at
One Place
V24V+
Ground Screw on Wiring Base
V24V+
Ground Screw on Wiring Base
V24V+
Ground Screw on Wiring Base
Ground Screw on Wiring Base
User
Specified
Unregulated
Linear Power
Supply
V+
Ground
Screw
V-
Ground V- at
One Place
See DeviceNet Cable System Planning and Installation Manual
(Publication No. DN-6.7.1) for recommendations and accessories.
Multiple Reader Connections using Other Power Supply
Below all readers are powered by another power supply. Use a linear unregulated power supply. The supply must provide 14 watts of power to each reader. Use a shielded cable (Belden 9316 recommended) when making power connections.
Note: You must ground V- to Earth Ground at a single point on the power supply link, preferably as near the power supply as possible.
Other
DeviceNet
Devices
Reader 1 Reader 2 Reader 3
See DeviceNet Cable System Planning and Installation Manual
(Publication No. DN-6.7.1) for recommendations and cable accessories.
Publication 2755-6.8
16–4 Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Configuring Bar Code
Reader 1
This section shows how to configure one the AdaptaScan Bar Code
Readers using the AdaptaScan Software (Catalog No. 2755-ASN).
The procedures in this section show how to:
• define the DeviceNet node address of the AdaptaScan Reader
• configure a bar code label and symbol
• configure the scanner
• configure the decoder trigger
• configure the serial port
• configure the format of messages and the message destination
The steps may vary for some procedures because of the different requirements of applications. For example, the bar code labels may vary from one application to the next.
Create a New Project
This section adds three bar code readers to a new project and then renames the project DeviceNet Peer-to-Peer.
1. Choose New from the Project menu to create a new project.
2. Click the New button three times to add three bar code readers
(Bar Code Reader 1, Bar Code Reader 2, Bar Code Reader 3) to the project.
Publication 2755-6.8
Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
3. Choose Edit from the Project menu to rename the project
DeviceNet Peer-to-Peer.
16–5
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Define the DeviceNet Address
1. Select Bar Code Reader 1 from the Project dialog.
2. Click the Device button on the Project dialog.
3. Set the DeviceNet address to 1.
4. Connect the 2755-NC43 or -NC48 Configuration Cable to Reader
1.
5. Click the Apply button.
6. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
16–6 Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Define the Bar Code Label
This section defines the bar code label used by the application. Each reader will scan/decode a different symbol. The 3 symbols are
UPC-A, Interleaved 2 of 5, and Code 39.
1. Click the Labels button to open the Bar Code Labels dialog.
2. Click the New button to define a label.
3. Click the New button to define Symbol 1.
Publication 2755-6.8
4. From the Symbology list box, select UPC-A.
To edit parameters of the selected symbology, click the
Symbologies button.
5. Click OK to return to the Bar Code Label dialog.
6. Click the Labels button to open the Bar Code Labels dialog.
7. Click the New button to define label 2.
8. Click the New button to define Symbol 1.
9. From the Symbology list box, select Interleaved 2 of 5.
To edit parameters of the selected symbology, click the
Symbologies button.
Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
10. Click OK to return to the Bar Code Label dialog.
11. Click the Labels button to open the Bar Code Labels dialog.
12. Click the New button to define label 3.
13. Click the New button to define Symbol 1.
14. From the Symbology list box, select Code 39.
To edit parameters of the selected symbology, click the
Symbologies button.
16–7
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Publication 2755-6.8
16–8 Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Configure the Decoder Trigger
Bar Code Reader 1 is triggered by its own package detect device.
Refer to Publication No. 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Triggered By, select Package Detect from the Input list.
3. Click the Save button.
4. Click the Close button and return to the main Project dialog.
Configure the Serial Port
Configure the parameters of the serial port to match the host device.
1. Click the Serial Port button from the main Project dialog.
Publication 2755-6.8
2. Verify that the serial port settings match the host device.
3. Click Save and then the Close button to return to the Project dialog.
Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Create a Message
This section defines the content of messages sent by Bar Code
Reader 1 to the host device over an RS-232 link.
1. Click the Message button from the main Project dialog.
16–9
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to open the Message Field.
This dialog defines the source and type of message.
6. Under Symbol Source, select Bar Code Reader 1.
7. Under Bar Code Label & Symbols, select Symbol 1.
Bar Code Reader 1 only reads UPC-A labels (per the Label 1 definition).
Publication 2755-6.8
16–10 Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
8. Check (enable) the Match Exactly check box.
9. Click the Edit button to open the Message Field Edit dialog.
10. Under Replacement Strings, type no read in the Fail: box.
Bar code data is sent to the host on a valid read. The Fail string sends “no read” to the host when a no read occurs on Bar Code
Reader 1.
11. Click OK to return to the Message Field dialog.
12. Click OK again to return to the Message dialog.
Define the Message Format
1. Click the Format button from the Message dialog.
2. In the Trailer text box, type \r\n (for CR, LF).
3. Verify that the Field Data check box (under Include) is checked.
4. Under Message Destination, select Serial Port.
Data is sent from the serial port of Bar Code Reader 1 to the host device over an RS-232 link.
5. Click OK to return to the Message dialog.
6. Click Save and then Close to return to the Project dialog.
Publication 2755-6.8
Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Configuring Bar Code
Reader 2
This section shows how to configure Bar Code Reader 2 on the
DeviceNet network.
Select Bar Code Reader 2 in the Project
From the Project dialog, select Bar Code Reader 2.
16–11
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address to 2 for the configuration download.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to Reader
2.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
16–12 Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
Publication 2755-6.8
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Configure the Decoder Trigger
Bar Code Reader 2 is triggered by its own package detect device.
Refer to Publication No. 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Bar Code Label, select Label 2.
3. Under Triggered By, select Package Detect from the Input list.
4. Click the Save button.
5. Click the Close button and return to the main Project dialog.
Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Create a Message
This section defines the content of messages sent by Bar Code
Reader 2 to the host device.
1. Click the Message button from the main Project dialog.
16–13
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to create a message field.
6. Under Symbol Source, select Bar Code Reader 2.
7. Under Bar Code Label & Symbols, select Symbol 1.
Bar Code Reader 2 reads Interleaved 2 of 5 labels (per the Label
2 definition).
8. Check (enable) the Match Exactly check box.
Publication 2755-6.8
16–14 Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
9. Click the Edit button to open the Message Field Edit dialog.
10. Under Replacement Strings, type no read in the Fail: box.
Bar code data is sent to the host on a valid read. The Fail string sends “no read” to the host when a no read occurs on Bar Code
Reader 2.
11. Click OK to return to the Message Field dialog.
12. Click OK again to return to the Message dialog.
Define the Message Format
1. Click the Format button from the Message dialog.
2. In the Trailer text box, type \r\n (for CRLF).
3. Verify that the Field Data check box (under Include) is checked.
4. Under Message Destination, select Serial Port and Bar Code
Reader 1 from the list box.
Data is sent to the host device through the serial port of Bar Code
Reader 1.
5. Click OK to return to the Message dialog.
6. Click Save and then Close to return to the Project dialog.
Publication 2755-6.8
Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Configuring Bar Code
Reader 3
This section shows how to configure Bar Code Reader 3 on the
DeviceNet network.
16–15
Selecting Bar Code Reader 3 in the Project
From the Project dialog, select Bar Code Reader 3.
Define the DeviceNet Address
1. Click the Device button on the Project dialog.
2. Set the DeviceNet address to 3 for the configuration download.
3. Connect the 2755-NC43 or -NC48 Configuration Cable to Reader
3.
4. Click the Apply button.
5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
16–16 Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Configure the Scanner
1. Click the Scanner button on the Project dialog to open the
Scanner dialog.
Publication 2755-6.8
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus.
3. Click the Close button and return to the Project dialog.
Configure the Decoder Trigger
Bar Code Reader 3 is triggered by its own package detect device.
Refer to Publication No. 2755-837 for other input sources that trigger the decoder.
1. Click the Decoder button from the main Project dialog.
2. Under Bar Code Label, select Label 3.
3. Under Triggered By, select Package Detect from the Input list.
4. Click the Save button.
5. Click the Close button and return to the main Project dialog.
Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Create a Message
This section defines the content of messages sent by Bar Code
Reader 3 to the host device.
1. Click the Message button from the main Project dialog.
16–17
2. Under Triggered By, check the Enable check box.
3. Under Device, select Bar Code Reader 1.
4. Under Input, select [Decoder].
5. Click the New button to create a message field.
6. Under Symbol Source, select Bar Code Reader 3.
7. Under Bar Code Label & Symbols, select Symbol 1.
Bar Code Reader 3 reads Code 39 labels (per the Label 3 definition).
8. Check (enable) the Match Exactly check box.
Publication 2755-6.8
16–18 Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
9. Click the Edit button to open the Message Field Edit dialog.
10. Under Replacement Strings, type no read in the Fail: text box.
Bar code data is sent to the host on a valid read. The Fail string sends “no read” to the host when a no read occurs on Bar Code
Reader 3.
11. Click OK to return to the Message Field dialog.
12. Click OK again to return to the Message dialog.
Define the Message Format
1. Click the Format button from the Message dialog.
2. In the Trailer text box, type \r\n (for CRLF).
3. Verify that the Field Data check box (under Include) is checked.
4. Under Message Destination, select Serial Port and Bar Code
Reader 1 from the list box.
Data is sent to the host device through the serial port of Bar Code
Reader 1.
5. Click OK to return to the Message dialog.
6. Click Save and then Close to return to the Project dialog.
Publication 2755-6.8
Communicating with AdaptaScan Bar Code Readers via DeviceNet Peer-to-Peer Protocol
Sending the
Configurations to the
Readers
Running the Application
16–19
From the main Project dialog, click the Send All button to download the configurations to Bar Code Reader 1, Bar Code Reader 2, and
Bar Code Reader 3.
When the application is running, bar code data is sent from the three bar code readers and to the host device. When selected from the
Message dialog, the AdaptaScan Bar Code Reader routes messages from each reader over DeviceNet to the serial port of Reader 1.
Publication 2755-6.8
Introduction
Hardware Requirements
Software Requirements
Communicating with
PanelView 900 Terminals on a DeviceNet Network
This application describes how to connect and configure communications for the DeviceNet versions of the PanelView 900 terminals. This document provides supplemental information for the
PanelBuilder Software User Manual (Publication No. 2711-6.0).
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
•
DeviceNet trunk cable
•
2711-K9C10, -T9C10, -K9A10, or -T9A10 PanelView 900 terminal
•
1747-L532, -L541, -L542, or -L543 SLC Processor or 1785
PLC-5 processor and appropriate chassis
•
1747-SDN Scanner Module (v2.05 firmware or later) or
1771-SDN Scanner Module (v3.04 firmware or later)
•
Computer running Windows 3.1 (or later) or Windows 95
•
9-to-25 Pin Adapter (for Computer with 25-pin COM port)
The software requirements for this application are:
•
2755-ASN AdaptaScan Offline Programming Software (v8.0 or later)
•
PanelBuilder software
•
6200 Series Programming Software or SLC Advanced
Programming Software
•
1787-MGR DeviceNet Manager Software (v3.0 or later)
Publication 2755-6.8
17–2 Communicating with PanelView 900 t Terminals on a DeviceNet Network
Related Publications Related publications include:
Publication
2755-837
2755-838
1787-6.5.3
1747-6.5.2
2711-6.0
2711-6.1
Description
AdaptaScan Bar Code Readers User Manual
AdaptaScan Software User Manual
DeviceNet Manager Software Manual
1747-SDN DeviceNet Scanner Configuration Manual
PanelBuilder Software User Manual
PanelView Operator Terminals User Manual
In addition, you may want to refer to the SLC and PLC-5 Hardware and Software User Manuals.
DeviceNet PanelView t
Terminals
Display Type
Color Monochrome n n n n
The table below lists the DeviceNet versions of the PanelView terminals. The differences in the terminals relate to:
• display type (monochrome or color)
• operator input (touch screen or keypad)
The DeviceNet terminals have:
•
DeviceNet communication port
•
RS-232 printer/file transfer port
In addition, each terminal is available with either AC or DC power.
The characters L1 at the end of the catalog number designate a terminal with DC power (e.g., -T9A10L1).
Operator Input
Touch Keypad n n n n
DeviceNet n n n n
Ports
RS-232 n n n n
2711-K9A10
2711-T9A10
2711-K9C10
2711-T9C10
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network
Typical DeviceNet Network Shown below is a typical DeviceNet network with PanelView terminals installed on two of the network drops.
17–3
PLC-5 Controller
SLC 5/04 or
DeviceNet
Scanner Module
(Catalog No.
1747-SDN)
PanelView 900
2711-K9A10, -K9C10
DeviceNet Network
DeviceNet
Scanner Module
(Catalog No.
1771-SDN)
PanelView 900
2711-T9A10, -T9C10
DeviceNet Port
DeviceNet
Port
Serial Link
RS-232 Port
Computer for developing
PanelView applications
RediSTATION
Drive
Î Î Î
Î Î Î
SM
C
Î Î Î
Smart Motor Controller
AdaptaScan
Bar Code
Reader
Publication 2755-6.8
17–4 Communicating with PanelView 900 Terminals on a DeviceNet Network
Making DeviceNet
Connections
Use DeviceNet cable to connect a DeviceNet version of a PanelView terminal to a DeviceNet Network.
Cable
DeviceNet Cable, 164 ft (50m)
DeviceNet Cable, 328 ft (100m)
DeviceNet Cable, 492 ft (150m)
Catalog No.
1485C-P1A50
1485C-P1A150
1485C-P1A300
Important: Refer to the DeviceNet Cable System Planning and
Installation Manual (Publication No. 1485-6.7.1) for network layout and design information.
PanelView 900 Terminal
Catalog Number 2711-K9A10, -T9A10, K9C10, -T9C10
5 1
DeviceNet Port
DeviceNet
Terminal Block
5
Terminal
1
Signal
COM
2
3
4
5
CAN_L
SHIELD
CAN_H
VDC+
Function
Common
Signal Low
Shield
Signal High
Power Supply
Color
Black
Blue
Uninsulated
White
Red
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network
Making Serial Port
Connections
PanelView 900 Terminal
Catalog Number 2711-K9A10,-T9A10, K9C10, -T9C10
Use the RS-232 serial port on the DeviceNet terminal to:
• download/upload applications over a serial link
• or to connect a printer
Computer
17–5
COMM 1 or 2
RS-232 Printer/
File Transfer Port
PanelView 900 Terminal
Catalog Number 2711-K9A10, -K9C10
Available Cables
2711-NC13 5 m (16.4 ft)
2711-NC14 10 m (32.7 ft)
2706-NC13 3 m (10 ft)
9 Pin to 25 Pin Adapter
(if required)
ÇÇ
9-pin female 9-pin male
Data Out (TXD)
Data In (RXD)
Signal Common
7
8
5
6
9
1
2
3
4
1
2
3
4
Data In (RXD)
Data Out (TXD)
7
8
9
5
6
Signal Common
RS-232
Port
Printer
RS-232 Printer/
File Transfer Port
Publication 2755-6.8
17–6 Communicating with PanelView 900 Terminals on a DeviceNet Network
Modifying DeviceNet
Settings from the Terminal
You can display or modify DeviceNet settings directly from the terminal. From the Configuration Mode menu of the terminal, select
Serial Communication Setup. The screen below appears.
!
ATTENTION: Settings downloaded with a
DeviceNet application have priority over terminal settings. DeviceNet settings take effect immediately after an application is downloaded.
63 2 Words
2 Words
500
XX.XX.XX
XXXXXXXX
PV900 Touch Screen shown
Other displays are similar
Restart Terminal [F1]
Resets the terminal.
New Node Address [F2]
Opens the numeric entry scratchpad. Enter the node address (0 - 63) of the PanelView terminal on the DeviceNet link and press the Enter key. A node address change takes effect on reset.
Active Node Address
Displays the current network operating address of the PanelView.
New Baud [F3]
Step through the available baud rates with each key press. The options are 125K, 250K and 500K (default is 125K). The selected baud rate takes effect after a reset. The maximum cable length is restricted at higher baud rates.
Active Baud
Displays the current baud rate setting of the PanelView. The baud rate is set to the value for New Baud on power up.
Note: The active baud is the baud rate of the PanelView not the network. The PanelView is not automatically set to the network baud rate.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network 17–7
Bus-off Interrupt [F4]
Specify what occurs when a CAN bus-off interrupt occurs on the
DeviceNet network. The PanelView is not allowed network access when Hold in Reset is selected and a bus-off interrupt occurs.
•
Hold in Reset holds the PanelView and waits for communications to be reset or a reset of the terminal.
•
Reset and Continue Communications resets DeviceNet communications and attempts to re-establish the communications link.
Interscan Delay [F5]
Opens the numeric entry scratchpad. Provide a delay between scans of the Explicit-Client tags. Enter a value of 0 to 65535 milliseconds.
This time delay is inserted between each full scan of the
Explicit-Client tags in the current screen context. This value is originally set by the downloaded application file but may be changed by an operator. When changed, the new value takes effect immediately.
Input Size
Displays the number of words (from 0 to 64) that are sent by the
PanelView in an I/O message. 0 is the default value which indicates that no input data is exchanged with the scanner. This value is set by the downloaded application.
Output Size
Displays the number of words (from 0 to 64) that are received by the
PanelView in an I/O message. 0 is the default value which indicates that no output data is exchanged with the scanner. This value is set by the downloaded application.
EXIT
To return to the Configuration Mode menu, press the Exit button.
COMM LED
Pattern
Solid Fill
Blinking
No Fill
Indicates
Normal operating state
No communications established
Hardware failure
Publication 2755-6.8
17–8 Communicating with PanelView 900 Terminals on a DeviceNet Network
Setting up
Communications using
PanelBuilder
Setting up DeviceNet communications for an application includes:
• selecting a DeviceNet terminal when creating the application.
• configuring communication parameters for the terminal on the
DeviceNet link.
Selecting a DeviceNet PanelView Terminal
Select a DeviceNet terminal for a PanelView application from:
•
New Application dialog when creating a new application or
•
Terminal Setup dialog when converting the application created for another terminal.
Any catalog number with 10 as the last number is a DeviceNet terminal.
The following PanelView terminals are available with a DeviceNet port.
Catalog No. PV Type
2711-K9C10 PV900C Color Keypad
2711-T9C10 PV900C Color Touch
2711-K9A10 PV900M Mono Keypad
2711-T9A10 PV900M Mono Touch
Indicates the RS-232 port is set for downloading applications.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network 17–9
Configuring DeviceNet Communications
DeviceNet communication parameters are accessed from the
Terminal Setup dialog. To open the Terminal Setup dialog, choose
Terminal Setup from the PanelBuilder Application menu.
7. Click the Comms. Setup button from the Terminal Setup dialog.
8. Under Terminal, edit the following parameters:
Specify
Node Address
Baud Rate
To
Select the address (0 to 63) of the PanelView terminal on the DeviceNet link.
Select the baud rate of the DeviceNet link. The available baud rates are:
125 kbps
250 kbps
500 kbps
9. Under I/O Scanner, edit the following parameters:
Specify
Input Size
Output Size
To
Specify the number of words (from 0 to 64) that are sent to the scanner from the PanelView with each I/O message. 0 is the default value which indicates that no input I/O data exists in the application.
Specify the number of words (from 0 to 64) that are received by the PanelView from the scanner with each I/O message. 0 is the default value which indicates that no output I/O data exists in the application.
Publication 2755-6.8
17–10 Communicating with PanelView 900 Terminals on a DeviceNet Network
10. Edit the following parameters.
Specify
Interscan Delay
Bus-off Interrupt
To
Provide a delay between scans of the
Explicit-Client tags. Enter a value of 0 to 65535 milliseconds. The default is 500 msec. This time delay is inserted between each full scan of the
Explicit-Client tags in the current screen context.
Note: Time delays of less than 500 msec should be carefully considered since the Explicit-Client mode will generate low priority network messaging at this interval.
Specify what occurs when a Bus-off interrupt occurs on the network:
Hold in Reset holds the PanelView and waits for communications to be reset.
Reset and Continue Communications resets
DeviceNet communications and attempts to re-establish the communications link (if possible).
11. Click Apply to save the settings.
12. Click OK to exit and return to the Terminal Setup dialog.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network
PanelView Message Types
17–11
All PanelBuilder screen control or display objects are assigned a tag when an application is developed. The tag specifies an address, data type, initial value, etc. for the data assigned to the control or display object. The Tag Editor for DeviceNet objects consist of three dialogs depending upon the message type selected.
Server Explicit and I/O Slave Messaging
The PanelView can exchange data with logic controllers, motor drives, bar code readers, etc. over a DeviceNet network. The
PanelView acts as a DeviceNet compliant UCMM-capable slave supporting Explicit and I/O Slave messaging. Change-of-State /
Cyclic and Polled I/O modes are supported. Strobed I/O messaging is not supported by the PanelView.
The I/O slave message connections uses the pre-defined
Master/Slave connection set. Exchanged data is grouped in
Assembly Object instances created using the PanelBuilder tag editor.
The first input instance and the first output instance are exchanged using DeviceNet’s I/O slave messages with a maximum of 64 input and 64 output words exchanged. If additional instances are configured, they can only be accessed by an Explicit Messaging
Client device using messages directed to the corresponding
Assembly Object Instance (Class 4, Attribute 3).
Notes on Using Server Explicit and I/O Slave Messaging:
•
The I/O size specified in the PanelView terminal must match the
I/O size expected by the DeviceNet scanner.
•
Both acknowledged and unacknowledged Change-of-State /
Cyclic modes are allowed. If acknowledgement is used, no data is returned. The Polled + COS option is allowed but the polled response data and the COS data are from the same assembly.
•
The PanelView has only one general purpose Explicit message connection available at a time to an external client device. Be aware of this limitation when creating applications requiring multiple Explicit message server connections to a PanelView.
•
Use of COS or Cyclic I/O connections is highly recommended over Polled I/O for I/O sizes in excess of 32 words.
•
Whenever possible, use COS or Cyclic I/O connections to minimize network I/O traffic.
Publication 2755-6.8
17–12 Communicating with PanelView 900 Terminals on a DeviceNet Network
Client Explicit Messaging
The PanelView can also communicate using explicit messaging, where the PanelView initiates the connections (Client). Connections to other devices are created (using tag editor addressing) and use explicit messages to read and write values to other DeviceNet nodes.
Only Get_Attribute_Single and Set_Attribute_Single commands are supported.
Output values assigned (addressed) to client objects in the current screen context (global or current screen) are scanned sequentially and data is read from the external device using Get_Attribute_Single requests.
Input values are sent to the external device (using a
Set_Attribute_Single request) when a change of state is detected on that input.
Notes on Using Client Explicit Messaging:
•
The devices communicating with the PanelView must have a sufficient number of available connections to support an Explicit message connection by the PanelView and any other connections required by the application. This includes a Group 2 Only Slave owned by a Group 2 Only Client such as a scanner capable of providing the UCMM service for the slave.
•
Data read/written must be accessible as an externally addressable
DeviceNet attribute with the Get_Attribute_Single /
Set_Attribute_Single commands.
•
Explicit-Client messaging is not designed for high speed communications and uses lower priority messaging on
DeviceNet. I/O messaging should be used for time critical applications.
!
ATTENTION: Do not use Client Explicit messaging with critical control parameters or as an alternative to a hard wired emergency stop button.
•
The PanelView has only one general purpose explicit message connection available at a time to an external client device. Be aware of this limitation when creating applications requiring multiple explicit message server connections to a PanelView.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network 17–13
The following diagram illustrates differences between message types:
I/O Slave Tags
Input Tag
Input Tag
Output Tag
Output Tag
Output Tag
Assembly
Instance 1
Assembly
Instance 2
Master Device
(Scanner)
PanelView
Explicit-Server Message Tags
Input Tag
Input Tag
Input Tag
Assembly
Instance >2
Output Tag
Output Tag
Assembly
Instance >2
PanelView
Server Device
(Scanner. PC, etc)
Explicit-Client Message Tags
Input Tag
Input Tag
Input Tag
Output Tag
Output Tag
Output Tag
Output Tag
PanelView
Client Device 1
(Sensor, Drive, etc)
Client Device 2
(Sensor, Drive, etc)
Client Device 3
(Sensor, Drive, etc)
Publication 2755-6.8
17–14 Communicating with PanelView 900 Terminals on a DeviceNet Network
PanelView Tag Editor Use the form view of the tag editor toEF enter DeviceNet tags. Do not use the table view since it does not show all of the DeviceNet fields.
I/O Slave Tag Form View
Field
Tag Name
➀➁
Data Type
Explicit-Client Tag Form View Explicit-Server Tag Form View
Description
The name of the tag
The data format for the tag
Valid Characters
Maximum characters = 32
•
A - Z, a - z, 0 - 9
• hyphen (-), underscore(_), percent (%)
Select one of the following:
• bit
•
4BCD
• unsigned integer
• signed integer
• IEEE Float
• bit array
• character array
Notes
• if you type an invalid character, the Tag Editor beeps and does not display it
• the tag name must be unique within a project
• cannot begin with 0 - 9, hyphen (-), or percent (%)
• tag names are not case-sensitive
• do not use blanks, tabs, carriage returns, non-printable characters
• the data type must be compatible with the data format selected in the object’s dialog.
Object Dialog
Tag Editor
Alternate Methods:
Type the first letter of the data type. For example, type b for the bit data type.
Use the TAB key to move to the Data Type field and press ALT+
↓ to display the list of available formats.
Table continued on the next page.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network 17–15
Field
Swap Bytes
Swap Words
Description
Only displayed when
Character Array data type is selected.
Only displayed when Float data type is selected.
Valid Characters
Check Box
Check Box
Notes
• when selected high and low data bytes swap positions. Select swap bytes when data is sent in the wrong order (high byte first). For example, data from a PLC is sent with the first character of a string in the second byte. By swapping the bytes, the first character corresponds to the first byte.
• byte swapping is not generally used with
Explicit-Client message types. These addressed devices will usually conform to DeviceNet specifications and send data in the correct sequence.
• when selected the high and low words of a floating point value are swapped. This allows floating point values generated by a PLC to be properly displayed.
• word swapping is not generally required for
DeviceNet devices that generate floating point values.
additional fields are required for Explicit message types.
instances 1 and 2 are assigned to I/O message type.
node address range from 0 to 63.
Message Type
Instance Number
(Explicit-Server
Message Only)
Node Address
(Explicit-Client
Message Only)
Load from EDS
(Explicit-Client
Message Only)
Write Tag
(Explicit-Client
Message Only)
Packet Bytes
(Explicit-Client
Message Only)
Bit Offset
(Explicit-Client
Message Only)
Class
(Explicit-Client
Message Only)
Instance
(Explicit-Client
Message Only)
Attribute
(Explicit-Client
Message Only)
Selects the message type.
Select an Instance from 3 to
16.
Specifies the node address of the peer device.
Loads information using the
Electronic Data Sheet. Refer to page 17–17.
When selected, tag is specified as a write tag (data sent to peer device).
Specifies the number of bytes in each message packet.
Specifies the offset that indexes into the returned data. Typically this value is
0.
Enter from device data sheet specifying the Class of the object being addressed.
Enter from device data sheet specifying the Instance of the object being addressed.
Enter from device data sheet specifying the Attribute of the object being addressed.
3 to 16
0 to 63 we recommend that you load parameter data from the data sheet for the peer device. Otherwise, enter the tag information (class, instance, attribute, etc) from the sheet manually.
If Write Tag is not selected, tag is specified as a read tag (data is read from peer device).
1 to 128
Table continued on the next page.
This value should match the amount of data in the attribute addressed in the external device.
bit offset is limited to the number of bytes specified for the Packet Bytes (i.e. if packet bytes is 2, Bit offset must be 0-15).
recommend that you load information from electronic data sheet (EDS) automatically if possible.
recommend that you load information from electronic data sheet (EDS) automatically if possible.
recommend that you load information from electronic data sheet (EDS) automatically if possible.
Publication 2755-6.8
17–16 Communicating with PanelView 900 Terminals on a DeviceNet Network
Field
Array Size
Description
Address
(I/O Slave and
Explicit-Server
Messages Only)
Initial Value
Scaling
➀➁
➂
Scale:
‘m’ in y = mx + b
Offset:
‘b’ in y = mx + b
Data Entry Limits
➂
Minimum
Maximum
Description
The size of the array
The description of the tag
Valid Characters
• character arrays are 1-128 characters
• bit arrays are 1-16 bits
Maximum characters = 255
• any printable
Notes
• the array size must be an integer.
• do not use blanks, tabs, carriage returns, non-printable characters
• do not use tabs, carriage returns, non-printable characters
• you can type the information in this field, or use the description editor.
Specifies the data sent to and from a remote device.
A remote address has the following format:
I: <word> / <bit>
O: <word> / <bit>
Note: /<bit> is required for Bit and Bit Array.
The starting value for the current tag in engineering units (used only for write tags).
The values you want to use to convert the current tag’s processor integer value (‘x’) to engineering units (‘y’)
The minimum and maximum values that can be assigned to the tag
Maximum characters = 32
For more information on valid addresses, refer to your processor’s user manual.
•
I specifies input data generated by the PanelView and sent to a remote device.
•
O specifies output data received by the PanelView from a remote device.
do not use blanks, tabs, carriage returns, non-printable characters
Maximum characters = 24
•
0 - 9
• e, E, +, - and period
• if the Data Type is bit, enter either 0 or 1
Maximum characters = 12
•
0 - 9
• e, E, +, - and period
Maximum characters = 12
•
0 - 9
• e, E, +, - and period
• do not use blanks, tabs, carriage returns, non-printable characters
• maximum precision is 6 places to the right of the decimal point for non-floating point values
• if present, a sign (+ or -) for the number must be first (+ is the default)
• if present, a sign for the exponent must immediately follow the e or E
• provides a preset value for numeric entry objects only
• no entry = default of 0
• do not use blanks, tabs, carriage returns, non-printable characters
• maximum precision for scale is 6 places to right of decimal point
• maximum precision for offset is 6 places to right of decimal point
• if present, a sign (+ or -) for the number must be first (+ is default)
• if present, a sign for the exponent must immediately follow the e or E
• do not use blanks, tabs, carriage returns, non-printable characters
• maximum precision is 6 places to the right of the decimal point
• if present, a sign (+ or -) for the number must be first (+ is the default)
• if present, a sign for the exponent must immediately follow the e or E
➀
Required fields for the Table View
➁
Required fields for the Form View
➁
These fields appear only when the data type is 4BCD, signed integer, unsigned integer, IEEE Float.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network
Using the Electronic Data
Sheet
17–17
The Electronic Data Sheet (EDS) contains operating parameters for the PanelView terminals communicating with other DeviceNet devices on an Explicit messaging level (no scanner).
The EDS parameters can automatically be uploaded to the
PanelBuilder tag editor. When the Explicit-Client message type is selected in the tag editor, the “Load From EDS” option appears on the dialog.
To load parameter data from the EDS:
1. Click the Load From EDS button to open the Open dialog.
devnet eds
PV900
Photo
RediSt
Drive
2. Select the EDS file you want to read.
3. After the file is loaded, the following dialog is displayed.
When you select a group, parameters available in that group will be selectable. By default, all parameters are displayed.
4. Select the appropriate parameter. If the parameter has bit-field enumeration associated with it, an Enumerated Data Item should be selected.
5. Select OK to continue.
The class, instance, and attribute associated with the selected parameter is displayed on the tag form.
Publication 2755-6.8
17–18 Communicating with PanelView 900 Terminals on a DeviceNet Network
Downloading Applications over a Serial Link
To download a DeviceNet application from your computer to the
PanelView 900 terminal over an RS-232 link:
• connect computer to RS-232 port of PanelView terminal
• download application from the PanelBuilder Application menu
Use PanelBuilder’s internal DF1 driver or the DF1 INTERCHANGE driver for the download. The internal DF1 driver uses fixed DF1 settings that match those of the RS-232 port of the terminal.
➀ Open the application you want to download.
➁ Choose Download from the Application menu.
Downloading Application using the Internal DF1 Driver
➂ Select the Download parameters.
Select Operator Terminal
Select Internal DF1 Driver
Shows DF1 driver is active on COM1 port
Enter name of .PVA file in which to save the translated .PBA file
Click OK when done
Setup button is active if more than one COM port is available to DF1 driver.
➃ Application is validated and translated to a .PVA file.
If errors or warnings are detected, the Exceptions dialog opens.
You must correct errors before download can proceed.
➄ PanelBuilder Software and terminal display status of download.
’TEST.PVA’
➅ Terminal resets, verifies and starts application.
Publication 2755-6.8
DeviceNet Application
Report
Communicating with PanelView 900 Terminals on a DeviceNet Network
The application printout for DeviceNet provides the following information:
• configuration data
• tag data
• supplemental data
17–19
Error Messages and
Codes
The following tables lists error messages and codes specific to
DeviceNet communications. For all other messages, refer to the
PanelView and PanelBuilder user manuals.
PanelBuilder Tag Error Messages
Message
Tag: <Tag Name> - Incomplete Address
Tag: <Tag Name> - Invalid Element Number
Tag: <Tag Name> - Expected Slash / in Tag Address
Tag: <Tag Name> - Invalid Bit Number. Bit number must be 0-15.
Tag: <Tag Name> - Expected Output Tag. Tag Address should begin with O.
Tag: <Tag Name> - Expected Input Tag. Tag Address should begin with I.
Tag: <Tag Name> - Input Element Extends Beyond Input Size.
Tag: <Tag Name> - Output Element Extends Beyond Output Size.
Tag: <Tag Name> - Expected Discrete Tag.
Tag: <Tag Name> - Expected Analog Tag.
Recommended Action
Change the tag address so it is the following format:
I:<word>/<bit> or O:<word>/<bit> where <bit> is required for Bit and Bit Array.
The Tag Address should have a numeric word offset.
Add a slash and bit number to the Tag Address
Change the bit number to a value between 0 and 15.
Change the Tag Address so it begins with an O.
Change the Tag Address so it begins with an I.
The word offset in the Tag Address must be less than the Input
Size specified on the Communications Setup Dialog.
The word offset in the Tag Address must be less than the
Output Size specified on the Communications Setup Dialog.
The Data Type implies that the Tag Address should specify a bit number.
The Data Type implies that the Tag Address should not specify a bit number.
Tag: <Tag Name> - Invalid Packet Length. Packet Length must be 1-128 bytes.
Change packet bytes to 1-128 bytes.
Tag: <Tag Name> - Cannot be converted to current protocol format.
This tag must be manually edited to the DeviceNet protocol.
Tag: <Tag Name> - Invalid Node Address. Node must be 0-63.
Tag: <Tag Name> - Invalid Bit Offset. Bit Offset must not extend beyond the packet length.
Tag: <Tag Name> - Expected Read Tag.
DeviceNet node addresses must be 0-63.
Reduce the Bit Offset.
Uncheck the Write Tag box on the Tag Form.
Tag: <Tag Name> - Expected Write Tag.
Tag: <Tag Name> - Invalid Address Type. Address must begin with I or O.
Tag: <Tag Name> - Explicit Server Input and Output Tags have been assigned to the same Assembly Instance.
Check the Write Tag box on the Tag Form.
Modify the Tag Address to begin with I or O.
An Assembly Instance can only be assigned all input tags or output tags. Place input and output tags in separate assembly instances.
Increase the input or output size on the terminal setup screen.
Tag: <Tag Name> - Invalid Data Size. Data element extends beyond input or output size.
Tag: <Tag Name> - Expected Colon. I or O should be followed by :
Tag: <Tag Name> - Bit Offset must be a multiple of 8 for Character Arrays.
Tag: <Tag Name> - Explicit Server Input Elements must be 0-63.
Add a colon : after the I or O.
Adjust the Bit Offset on the Tag Form.
Reduce the word offset for the associated Tag Address.
Table continued on the next page.
Publication 2755-6.8
17–20 Communicating with PanelView 900 Terminals on a DeviceNet Network
Message
Tag: <Tag Name> - Explicit Server Output Elements must be 0-63.
Tag: <Tag Name> - Data Type implies Packet Bytes should be equal to 2.
Certain PanelBuilder controls, however, may require additional bytes. If less than 2 bytes are required, use Bit Array.
Tag: <Tag Name> - Data Type implies Packet Bytes should be equal to 4.
Certain PanelBuilder controls, however, may require additional bytes.
Tag: <Tag Name> - Data Type implies Packet Bytes should be less than or equal to 2. Certain PanelBuilder controls, however, may require additional bytes.
Tag: <Tag Name> - The length of the data extends beyond the size of the packet.
Recommended Action
Reduce the word offset for the associated Tag Address.
Most PanelBuilder controls write only 1 element of data. If the associated Data Type is an Unsigned Integer, this implies 2 bytes will be written by the Tag. However, if tags are assigned to the Block Write of a Piloted Control List, the number of bytes written will be a multiple of the states displayed on the list.
Most PanelBuilder controls write only 1 element of data. If the associated Data Type is a Floating Point, this implies 4 bytes will be written by the Tag. However, if tags are assigned to the
Block Write of a Piloted Control List, the number of bytes written will be a multiple of the states displayed on the list.
Most PanelBuilder controls write only 1 element of data. If the associated Data Type is an Bit Array, this implies at most 2 bytes will be written by the Tag. However, if tags are assigned to the Block Write of a Piloted Control List, the number of bytes written will be a multiple of the states displayed on the list.
If the associated tag is an I/O tag, increase either the Input or
Output Size. If the associated tag is Explicit-Server, the data size extends beyond the 64 word limit of the Assembly
Instance.
Increase the Packet Bytes assigned to the tag.
Tag: <Tag Name> - The length of the data extends beyond the size of the packet. Adjust Packet Bytes to at least #.
Tag: <Tag Name> - This tag cannot be assumed consistent or ”atomic”. The tag’s Message Type is inconsistent with previous tags in this group.
Tag: <Tag Name> - This tag cannot be assumed consistent or ”atomic”. The
Assembly Instance is inconsistent with the previous tags in this group.
Tag: <Tag Name> - This tag cannot be assumed consistent or ”atomic”. The
Peer’s Class, Instance, Attribute, or Node Address is inconsistent with previous tags in this group.
Tags have been assigned to a PanelBuilder control that must be updated in the same data packet. Change the Message
Type so that it is the same as other members of this group.
Tags have been assigned to a PanelBuilder control that must be updated in the same data packet. Change the Assembly
Instance so that it is the same as the other members of this group.
Tags have been assigned to a PanelBuilder control that must be updated in the same data packet. Change the
Explicit-Client message so that it references the same peer attribute as other tags assigned to this group.
PanelBuilder Device Error Messages
Message
Device: <Device Name> - Cannot be converted to current protocol format.
Recommended Action
Create a new device entry under the Terminal Setup Dialog.
Device: <Device Name> - Converted to DeviceNet. Default communication parameters will be used.
Update the Communications Setup Dialog to the appropriate network values. (i.e. Node Address, Baud Rate, etc.)
Device: <Device Name> - Communication settings have never been initialized.
Update the Communications Setup Dialog to the appropriate network values. (i.e. Node Address, Baud Rate, etc.)
PanelBuilder Translation Error Messages
Message
Too many peer accesses. Only 128 Explicit-Client message channels are allowed per application.
Translation Failure
Recommended Action
Reduce the number of Explicit-Client Tags in your application.
Contact Allen-Bradley for technical support.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network 17–21
Electronic Data Sheet (EDS) File Error Messages
In order to support scaling, the PV Data Type will be changed to Unsigned
Integer.
Unable to open EDS File.
Invalid EDS File.
Could not allocate memory.
Message
The DeviceNet Data Type (#) is unsupported by PanelView. Use of this parameter may produce unexpected results.
The DeviceNet Data Type (#) does not match the PanelView Data Type chosen. It is recommended that either Bool or Bit Array is chosen.
The DeviceNet Data Type (#) does not match the PanelView Data Type chosen. It is recommended that either Signed or Unsigned Integer is chosen.
Display value scaling may be necessary.
The DeviceNet Data Type (#) does not match the PanelView Data Type chosen. It is recommended that Floating Point is chosen.
The DeviceNet Data Type (#) does not match the PanelView Data Type chosen. It is recommended that Char Array is chosen.
This parameter designates that extended precision scaling should be used to display the parameter. PanelView does not support extended precision scaling.
Recommended Action
There is no corresponding PV Data Type for the DeviceNet parameter that was chosen. Use of this parameter requires knowledge of how the DeviceNet data is structured. For instance, one element of the DeviceNet Time Data Type may be displayed, but the location of the internal fields must be known.
Bool or Bit Array corresponds most closely to the parameter chosen.
Signed or Unsigned Integer corresponds most closely to the parameter chosen.
Floating Point corresponds most closely to the parameter chosen.
Character Array corresponds most closely to the parameter chosen.
The chosen parameter specifies Extended Precision Scaling.
The appropriate scaling factor must be manually determined and entered into the Scale and Offset fields on the Tag Form.
The chosen parameter has scaling factors. To support scaling factors, an appropriate PV Data Type must be chosen. The scaling factor will be calculated and entered as the Scale and
Offset values on the Tag Form.
The system was unable to open the specified EDS file.
The EDS file is corrupt or contains too many parameters to be read.
The system is unable to allocate enough memory to read the
EDS file.
Publication 2755-6.8
17–22 Communicating with PanelView 900 Terminals on a DeviceNet Network
Communication Status Error Messages
These errors appear as a banner at the top of an application screen
(error #634 in upper left corner) or as Mod/Net LED status display on the terminal configuration screen.
Errors numbered less than 10 are considered minor fault conditions and will clear automatically when corrected. Errors numbered above
10 require that the terminal be reset to clear the error.
Code
1
2
3
4
5
11
12
13
No connections established.
Occurs on power-up until a device connection is established on the network.
A connection is in the timed out state. Occurs once I/O messaging is stopped after an I/O connection has been running.
An Explicit-Client tag cannot be obtained. Occurs if the device associated with an Explicit-Client tag is not responding or the peer tag does not exist at the specified class, instance, and attribute number.
Indicates
A zero length I/O message was received placing the I/O application in idle mode. Occurs when the scanner is in program mode.
Message Overrun. Message traffic from the PanelView is being generated quicker than it is possible to send the data.
Occurs with large I/O sizes when Change-Of-State is being used and state changes are occurring very quickly or if polling too fast when large I/O sizes are involved.
No network power detected. Occurs if no network 24V is present.
Dup MAC Failure. Occurs if the PanelView powers up with the same Node Address present on the network.
Bus-Off Interrupt occurred. CAN Chip is held in reset. Caused by noise on network signal lines or attempting to attach to the network at the wrong baud rate. May also occur if some other device on the network attaches at the wrong baud rate
Recommended Action(s)
Establish a connection over DeviceNet to the PanelView.
Make sure that wiring is OK on the network and that the master device (scanner, etc. ) is operational.
Make sure that the specified location of the data is correct and that the end device is attached and operational. For write tags, ensure that the appropriate attribute is targeted. If the targeted device is UCMM capable, ensure it has enough available explicit message connections to allow the PanelView to take one. If the targeted device is not UCMM capable, ensure that it is owned by a Master device (scanner, etc.).
Error clears when switched back to run. Correct the problem of the Master sending the I/O idle condition.
Slow down I/O polling or the state changes generating change of state I/O messages. Use cyclic I/O at a fast heartbeat rate rather than change-of-state. Use the production inhibit capability on the master.
Make sure DeviceNet wiring is providing power to the
PanelView and reset the terminal.
Change the node address to one not currently in use and reset the terminal.
Make sure Baud Rate is correct and wiring is correct on the network, including termination resistors. Reset the terminal.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network 17–23
Alert Messages
These messages appear as a box in the middle of the screen (Error
#636 in upper left of box) and alert the user to a particular condition.
Operation of the terminal continues. Alert messages can be cleared.
2
3
4
7
8
Code
10
12
13
14
15
16
19
Indicates
Unsupported DeviceNet Message type received. A message was received by the Network Access Object that is not supported.
Initial Writes Failure. The Motherboard failed to send all input data to the daughter card prior to network startup. This error should not happen during normal operation.
Invalid Explicit-Client Address. Occurs at run time if the node address associated with an Explicit-Client tag is the same as the PanelView’s own.
Change-Of-State Input Overrun.
Occurs if PanelView state changes on I/O input data occurred faster than the PanelView could send them to the I/O scanner.
Identity Object Reset Service received over DeviceNet.
Occurs if an external device sends a Identity Object Reset
Service to the PanelView.
Unsupported DeviceNet message received. Should not occur under normal operating conditions.
Invalid ASA Number (0x00000000 or 0xFFFFFFFF). Will not occur unless the flash memory has been corrupted or an invalid ASA number was programmed in the production process.
Invalid Screen Context Priority received. Should not occur under normal operating conditions.
Get Next Scan Item Failed in peer mode. Should not occur under normal operating conditions.
Explicit-Client Input Data not received. Will occur if an input
(push-button, etc.) changes a second time before its previous state was successfully sent on the network. Only for
Explicit-Client Tags.
Recommended Action(s)
This should not occur in normal operation. Clear the message and if the problem reoccurs, consult Allen-Bradley.
Clear the message and if the problem reoccurs, consult
Allen-Bradley.
Clear the message and determine which tag in the application is pointing to the PanelView’s node address. Correct the application.
Clear the message. Excessive network traffic could cause this problem if inputs are changing rapidly.
An external network device has requested the PanelView be reset. Reset the PanelView manually from the configuration screen.
Clear the message and if the problem reoccurs, consult
Allen-Bradley.
Clear the message. The message will reoccur each time the terminal is reset. The terminal will operate normally but the problem should be corrected. Consult Allen-Bradley.
Clear the message and if the problem reoccurs, consult
Allen-Bradley.
Clear the message and if the problem reoccurs, consult
Allen-Bradley.
Clear the message. Excessive network traffic could cause this problem if inputs are changing rapidly. Handle high speed input data over I/O connections if possible.
Also make sure that the addressed attribute exists and is settable on the network.
Clear the message and if the problem reoccurs, consult
Allen-Bradley.
I/O Connection Size does not match size of I/O data in
Assembly Instances 1 & 2. Programmed connection sizes for
I/O do not match the amount of data represented by the I/O type tags.
Get Next Context Request Failure. In Explicit-Client mode scanning, the request for obtaining the next tag in current context failed. Should not occur under normal operating conditions.
Clear the message and if the problem reoccurs, consult
Allen-Bradley.
Publication 2755-6.8
17–24 Communicating with PanelView 900 Terminals on a DeviceNet Network
Fault Messages
These messages indicate critical fault conditions. They appear as a full screen box with an Error #635 in the upper left corner. The terminal must be reset to clear the condition. If the problem persists,
Allen-Bradley should be contacted and the two digit code number associated with the error noted.
20xx
Errors
9, 10,
11, 21,
22, 24,
25, 26,
27, 28,
29, 30,
31, 32,
34, 35, and 36
Code
17
18
37
Indicates
Client Object Failed. No way to force this. Should not occur under normal operating conditions.
CAN Chip Failed to initialize. Should not occur under normal operating conditions.
The channel size of a particular channel exceeds the size limitations set by the daughtercard. Should not occur under normal operating conditions.
Critical Internal DeviceNet Firmware fault. Should not occur under normal operating conditions.
Internal faults associated with motherboard/daughtercard communications. Should not occur under normal operating conditions.
Recommended Action(s)
Reset the terminal and if the problem reoccurs, consult
Allen-Bradley.
Reset the terminal and if the problem reoccurs, consult
Allen-Bradley
Reset the terminal and if the problem reoccurs, consult
Allen-Bradley.
Reset the terminal and if the problem reoccurs, consult
Allen-Bradley.
Reset the terminal and if the problem reoccurs, consult
Allen-Bradley.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network
AdaptaScan Application
17–25
This application provides an example of using explicit-client messages to monitor decoded bar code data and change attributes of an AdaptaScan Bar Code Reader. The AdaptaScan is connected directly to the PanelView.
Power Supply
(Catalog No. 2755-PW46)
AdaptaScan Reader
PanelView 900
The DeviceNet network must be supplied with power. In this application, you can use the AdaptaScan power supply (Catalog No.
2755–PW46). The power supplies used with DeviceNet are sized to the number of devices and DeviceNet cable lengths. Review your
DeviceNet literature for DeviceNet network configuration data.
Note: AdaptaScan software version 7.0 or later with reader firmware 7.0 or later is required to run this application.
Connections
The PanelView connects directly to the DeviceNet terminal block in the AdaptaScan wiring base. Refer to Publication No. 2755-837 for
DeviceNet and power supply connections.
Publication 2755-6.8
17–26 Communicating with PanelView 900 Terminals on a DeviceNet Network
PanelView Screen
The following shows how the PanelView screen appears in
PanelBuilder (Catalog No. 2711-ND3). You will need to create this screen for your application.
In this application, the PanelView terminal:
• displays decoded bar code data from the AdaptaScan Reader
• displays the package count of the AdaptaScan Reader
• resets the package count
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network 17–27
Read Bar Code Data Tag Configuration
The dialog box for the bar code display object is shown below. The display is configured as an ASCII string with an embedded variable
(bar code data). The Field Width is set to 24 characters and is based on the expected maximum bar code data length in characters. The tag name is Bar_Code_Data.
By selecting the Edit Tag option, you can edit the tag data as shown below.
The tag data type is “Character Array”. It is an explicit-client read message with the Class, Instance and Attribute values as shown. To read bar code data, the bit offset must be set to 16. The offset is necessary since the first two bytes represent the length of the requested data.
Publication 2755-6.8
17–28 Communicating with PanelView 900 Terminals on a DeviceNet Network
Read Package Counter Tag Configuration
AdaptaScan can keep a count of how many times it was triggered or asked to read a bar code. The dialog box for the package count numeric display object is shown below.
The PanelView will display six digits of the Package count value, the package count from the AdaptaScan can be up to ten digits. By selecting the Edit Tag option, you can edit the tag data as shown below.
Publication 2755-6.8
The data type is Unsigned Integer. The data type should be changed to Signed Integer. The Class, Instance and Attribute are set to read the AdaptaScan package count.
Note: Use the Print function of the AdaptaScan software to print application data. The report will provide you with the DeviceNet
Class and Instance values for the configuration data.
Communicating with PanelView 900 Terminals on a DeviceNet Network 17–29
Write Package Count Reset
The PanelView uses an explicit-client message to reset the
AdaptaScan package count. The reset message is sent by a push button object in PanelView.
The dialog box for the package count reset push button is shown below.
By selecting the Edit Tag option, you can edit the tag data as shown below.
Note: The Write Tag box is checked indicating a write tag.
Note: Use the Print function of the AdaptaScan software to print application data. The report will provide you with the DeviceNet
Class and Instance values for the configuration data.
Publication 2755-6.8
17–30 Communicating with PanelView 900 Terminals on a DeviceNet Network
AdaptaScan Configuration
The AdaptaScan Reader must be configured to make data available for the PanelView terminal. You must configure the AdaptaScan
Reader for the bar code symbology being read, the number of bar codes, scan pattern and triggering as you would for any other application. Refer to Publication No. 2755-838 for information regarding the basic set up of the AdaptaScan Bar Code Reader. The following sections only provide the information necessary to make the data available for the PanelView terminal.
Making Bar Code Data Available
To make the bar code data available on DeviceNet, the AdaptaScan
Bar Code Reader must be configured to make the data available.
The two dialog screens shown below set up a message field that contains the bar code data. See Publication No. 2755-838. The fields containing Symbol 1, Symbol 2, Symbol 3, define three bar code types configured for the AdaptaScan Reader.
Publication 2755-6.8
Communicating with PanelView 900 Terminals on a DeviceNet Network 17–31
Making Package Counter Data Available
Package counter data must be made available to the PanelView terminal by setting up an unconditional match in the AdaptaScan Bar
Code Reader. The figure below shows the two dialog boxes that need to be modified.
Publication 2755-6.8
Rockwell Automation helps its customers receive a superior return on their investment by bringing together leading brands in industrial automation, creating a broad spectrum of easy-to-integrate products. These are supported by local technical resources available worldwide, a global network of system solutions providers, and the advanced technology resources of Rockwell.
Worldwide representation.
Argentina
•
Australia
•
Austria
•
Bahrain
•
Belgium
•
Bolivia
•
Brazil
•
Bulgaria
•
Canada
•
Chile
•
China, People’s Republic of
•
Colombia
•
Costa Rica
•
Croatia
•
Cyprus
Czech Republic
•
Denmark
•
Dominican Republic
•
Ecuador
•
Egypt
•
El Salvador
•
Finland
•
France
•
Germany
•
Ghana
•
Greece
•
Guatemala
•
Honduras
•
Hong Kong
Hungary
•
Iceland
•
India
•
Indonesia
•
Iran
•
Ireland
•
Israel
•
Italy
•
Jamaica
•
Japan
•
Jordan
•
Korea
•
Kuwait
•
Lebanon
•
Macau
•
Malaysia
•
Malta
•
Mexico
•
Morocco
The Netherlands
•
New Zealand
•
Nigeria
•
Norway
•
Oman
•
Pakistan
•
Panama
•
Peru
•
Philippines
•
Poland
•
Portugal
•
Puerto Rico
•
Qatar
•
Romania
•
Russia
•
Saudi
Arabia
•
Singapore
•
Slovakia
•
Slovenia
•
South Africa, Republic of
•
Spain
•
Sweden
•
Switzerland
•
Taiwan
•
Thailand
•
Trinidad
•
Tunisia
•
Turkey
•
United Arab Emirates
United Kingdom
•
United States
•
Uruguay
•
Venezuela
Rockwell Automation Headquarters, 1201 South Second Street, Milwaukee, WI 53204-2496 USA, Tel: (1) 414 382-2000 Fax: (1) 414 382-4444
Rockwell Automation European Headquarters, Avenue Hermann Debroux, 46, 1160 Brussels, Belgium, Tel: (32) 2 663 06 00, Fax: (32) 2 663 06 40
Rockwell Automation Asia Pacific Headquarters, 27/F Citicorp Centre, 18 Whitfield Road, Causeway Bay, Hong Kong, Tel: (852) 2887 4788, Fax: (852) 2508 1846
World Wide Web: http://www.ab.com
Publication 2755-6.8
Supersedes Publication 2755-6.8 – September 1996
Supersedes Publication 2755-2.58 – January 1996
40062-359-01 (B)
Copyright 1997 Allen-Bradley Company, Inc. Printed in USA
Publication 2755-6.8

Public link updated
The public link to your chat has been updated.
Advertisement
Key features
- Reads bar codes from a variety of surfaces
- Powerful and versatile
- Can be used in a variety of applications
- Easy to use
- Can be configured to meet the specific needs of your application