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

The text of a manual · part 22 of 27

AdaptaScan Software (Cat. No. 2755-ASN) User Manual: 14 - Dynamic Data Exchange

Pages 186 to 193 of 224, from AdaptaScan Software (Cat. No. 2755-ASN) User Manual

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

For the Accu-Sort 2755-SN3, Accu-Sort 2755-SN5, Allen-Bradley 2755-SN5, Accu-Sort 2755-SN8 and Allen-Bradley 2755-SN8

Page 186

Chapter

14

Dynamic Data Exchange Chapter Objectives

This chapter describes how to exchange data between the AdaptaScan Configuration Software and other Windows applications that support Dynamic Data Exchange (DDE). Section

Overview

Page

Overview

14–1

DDE Format

14–2

DDE Topics

14–2

Read Performance in Excel

14–3

Read LED Status in Excel

14–4

Read Label Data in Excel

14–5

Read Match or Package Count in Excel

14–5

Writing Excel Data to a Reader

14–6

Excel Read Example

14–7

DDE Through an AdaptaScan Serial Port

14–8

The AdaptaScan configuration software allows you to exchange data and commands with other application software that supports DDE such as Microsoft Excelt. Both software applications must be running at the same time. DDE is supported by numerous applications, including:

• • • • • • • •

RSI Win series of software RSDATA.vbx Winlinks WinView Custom Visual Basic Drivers Microsoft Excel Microsoft Access Microsoft Word

Data can be either read from or written to the Reader depending upon the DDE function of the software. When data is read, the Reader data (such as label data) is provided to other software. When data is written, the Reader stores the data (such as match table rule) or performs a function (such as reset counters). Reader data is identified by a topic name and an address or instance number. Providing other software packages with the Reader topic name and address/instance allows the software to access the corresponding data. Note: The Monitor dialog must be closed before executing the DDE.

Page 187

14–2

DDE Syntax

The DDE syntax varies between software packages. Refer to your software instructions for the required DDE syntax. The syntax used by Microsoft Excel is: =Server|Topic!’Item’ Where: Server is AS_OLP | is the server / topic delimiter Topic is the name of the data you want to exchange ! is the topic / item delimiter Item specifies the node number of the data you want to exchange. Note: If the topic name contains a space, the topic name must be preceded and terminated by quote marks ’Topic Name’. For example, if you wanted to have Excel show the match count of a Reader (DeviceNet address 0) you would enter the following string in a worksheet cell: =AS_OLP|’MATCH COUNT’!’0’ Only one link to a topic can be made at a time. For example, you cannot display Reader performance in more than one Excel worksheet.

AdaptaScan DDE Topics Topic Performance

LEDS

You can use DDE with the following AdaptaScan topics.

Function Read performance data.

Read status of LEDs.

Data Returned Scanner performance as the number of symbols decoded within a trigger period (000 to 100) LED Status where 0 = Off 1 = Yellow 2 = Green 3 = Red 4 = Undefined 5 = Flashing Yellow 6 = Flashing Green 7 = Flashing Red Label Data

Example using Excel (default address of 63 shown) =AS_OLP|PERFORMANCE!’63’

=AS_OLP|LEDS!’63 1’

Labels

Read label data as it is decoded

Match Counter

Read match counter.

Match count

=AS_OLP|’MATCH COUNTER’!’63’

Package Counter

Read package count.

Package count

=AS_OLP|’PACKAGE COUNTER’!’63’

Reset Counters

Reset package / match counters.

1 = Ok, 0 = Fail

=AS_OLP|’RESET COUNTERS’!’63’

Set Match Rule

Write match rule to match table.

1 = Ok, 0 = Fail

=AS_OLP|’MATCH RULE’!’63’

Trigger

Turn trigger on.

1 = Ok, 0 = Fail

=AS_OLP|TRIGGER!’63’

Trigger Off

Turn trigger off.

1 = Ok, 0 = Fail

=AS_OLP|’TRIGGER OFF’!’63’

Publication 2755-838

=AS_OLP|LABELS!’63’

Page 188

14–3

Read Performance in Excel

Reader performance is provided as the number of symbols decoded within a trigger period. To share performance data with an Excel worksheet, enter the following in a cell: =AS_OLP|PERFORMANCE!’0’ Server

Topic

Address 0

The Excel cell displays the performance data value:

Publication 2755-838

Page 189

14–4

Read LED Status in Excel

Reader LEDs are displayed individually (LEDs 1 to 7) or as an array. To read LED status as an array, don’t specify an individual LED. To share LED data with an Excel worksheet, enter the following in a cell: Individual LEDs

=AS_OLP|LEDS!’2 1’ Server

LED Array

Topic Address 2 LED 1

=AS_OLP|LEDS!’2’ Server

Topic

Address 2, Read Array

LED1 LED2

LED5

LED3

LED6

LED4

LED7

The Excel cell displays the LED status individually or as an array:

Publication 2755-838

Page 190

14–5

Read Label Data in Excel

Label data may be read as it is decoded. To read label data in an Excel worksheet, enter the following in a cell: =AS_OLP|LABELS!’2’ Server

Topic

Address 2

The Excel cell displays the label data:

Read Match or Package Count in Excel

Reader counter values are provided as a 6 digit value. To share counter data with an Excel worksheet, enter the following in a cell: Package Counter =AS_OLP|’PACKAGE COUNTER’!’2 6’ Server

Match Counter

Topic

Address 2

Instance Number

=AS_OLP|’MATCH COUNTER’!’0 2’ Server

Data Topic

Address 0 Instance Number

Publication 2755-838

Page 191

14–6

Writing Commands to a Reader

Using DDE, you can also write commands to a Reader. You can write to the following:

• • • •

Reset Counters Set Match Rule (writes match rule to match table) Trigger On Trigger Off

After performing the function, the Reader returns data showing the result (0 = Fail, 1 = Ok). The following are examples of the write syntax used for Excel. Refer to the software user manual for the DDE syntax required by your other software application.

Reset Counters =AS_OLP|’RESET COUNTERS’!’0’ Server

Topic

Address 0

Set Match Rule =AS_OLP|’SET MATCH RULE’!’0 1 abcde’ Server

Trigger On

Topic

Address 1

=AS_OLP|’TRIGGER OFF’!’1’ Server

Publication 2755-838

Address 0

=AS_OLP|TRIGGER!’1’ Server

Trigger Off

Topic

Topic

Address 1

Match Rule

Instance Number

Page 192

14–7

Excel Example

Here is an example of using DDE with Microsoft Excel: 1. Configure the Reader to decode a bar code (refer to Chapter 3). These instructions assume the Reader is assigned an address of 0. If needed, click the Device button to open the Device dialog, change the address, and click the Apply button. 2. Click on the minimize button to reduce the AdaptaScan configuration software to an icon. Do not exit the software. 3. Open a Microsoft Excel worksheet. 4. Enter the following data into the cells: Cell A1: = AS_OLP|PERFORMANCE!’0’ Cell A2: =AS_OLP|LEDS!’0 2’ Cell A3: =AS_OLP|LABELS!’0’ 5. The Excel worksheet will display the corresponding data from the Reader.

Cell A1 shows the scanner performance Cell A2 displays the Status of LED #2 Trigger/Read Cell A3 displays the bar code data 6. Move the bar code symbol out of the scan beam. Notice how the data displayed in the Excel worksheet automatically updates.

Publication 2755-838

Page 193

14–8

DDE Through the AdaptaScan RS-232 Port

Publication 2755-838

Dynamic Data Exchange can also occur through devices connected to an AdaptaScan RS-232 serial port. DDE through the serial port functions the same as with the configuration cable (connected to programming connector). To use DDE, make sure you select DF1 and enable Scanner Protocol. Shown below is an example of the serial port setup should appear. Make sure the communication parameters of the host device match the AdaptaScan serial port.