NCR Scanner Programmer's Guide

176
Scanner/Scale Interface Function Prefix Address Terminator BCC Data 11713 Programmer's Guide D2-1074-A

description

fggdfg

Transcript of NCR Scanner Programmer's Guide

  • Scanner/Scale Interface

    Function

    PrefixAddress

    Terminator

    BCC

    Data

    11713

    Programmer's Guide

    D2-1074-A

  • The program product(s) described in this book is a licensedproduct of NCR Corporation.

    It is the policy of NCR Corporation to improve products as newtechnology, components, software, and firmware becomeavailable. NCR Corporation, therefore, reserves the right tochange specifications without prior notice.

    All features, functions, and operations described herein may notbe marketed by NCR in all parts of the world. In some instances,photographs are of equipment prototypes. Therefore, before usingthis document, consult your NCR representative or NCR office forinformation that is applicable and current.

    Copyright 1997By NCR CorporationDayton, Ohio U.S.A.All Rights ReservedPrinted in U.S.A.Confidential, unpublishedProperty of NCR Corporation

  • Interface Programmers Guide i

    Preface

    This book is for the various people who writeapplication programs to facilitate communicationsbetween an NCR scanner and a host terminal. The firsttwo sections present the information that a programmerneeds for working with RS-232 and the two OCIA longformats. The last two chapters contain step-by-stepinstructions for implementing the information in thisbook into a software program

    After initially reading the sections that are relevant tothe protocol you plan to use, the first six chaptersshould be used as a reference source, while the last twochapters serve as examples.

    About this Book

  • ii Interface Programmers Guide

    You can obtain further information about programmingNCRs new generation of scanner products bycontacting your NCR representative. The following listsidentify additional information products and how toobtain them.

    Other Information ProductsBST0-212-90 NCR 7870 Scanner/Scale Users GuideBD90-1062-A NCR 7875 Scanner/Scale online helpBD20-1060-A NCR 7880 Scanner/Scale Programmers GuideBD20-0901-A NCR 7890 Presentation Scanner Users Guide

    How to Obtain Information Products

    Web Sites http://inforetail.AtlantaGA.NCR.COM

    (NCR only) http://www.info.NCR.COM (Anyone)

    Online Order Connect System (NCR only)

    Phone Order 800-543-2010 (US area) 622-3727 (VOICEplus) 32-2-727-95-49 (International)

    Fax Order 937-445-6245 (US area) 32-2-727-95-50 (International)

    E-Mail Information+Products.Publishing@

    DaytonOH.NCR.COM (US area) [email protected].

    COM (International)

    Mail Order NCR Corporation IPP-Dayton

    1700 S. Patterson BoulevardDayton, OH 45479USA

    NCR OTC-BrusselsRue De La Fusee 50B-1130 BrusselsBelgium

    Further Information

  • Interface Programmers Guide iii

    Contents

    Chapter 1Introduction

    Equipment....................................................................... 1-1Slot Scanners............................................................. 1-1Presentation Scanners .............................................. 1-1

    Communication Protocols ............................................. 1-3RS-232 ....................................................................... 1-3OCIA ....................................................................... 1-3

    OCIA NCR Long Format .................................. 1-4OCIA NCR Single Cable Format ...................... 1-4

    Chapter 2RS-232 Options

    Terminal/Scanner Setup................................................ 2-1RS-232 Options ......................................................... 2-1

    Baud Rate............................................................ 2-2Parity ................................................................. 2-2Character Length ............................................... 2-2Stop Bits .............................................................. 2-2RTS/CTS Handshake ........................................ 2-3BCC Options....................................................... 2-3Interface Control ................................................ 2-4

  • iv Interface Programmers Guide

    Understanding Your Options........................................ 2-5Model Differences .................................................... 2-5

    VLI and Bit 6 EOM............................................. 2-5

    Chapter 3RS-232 Message Structures

    Command Message Format........................................... 3-1Scanner-Only Format ............................................... 3-1

    Prefix Byte........................................................... 3-2Function Code .................................................... 3-2Data ................................................................. 3-2Terminator Byte.................................................. 3-3BCC Byte............................................................. 3-3

    Scanner/Scale Format .............................................. 3-3Prefix Byte........................................................... 3-3Address Byte ...................................................... 3-4Function Code .................................................... 3-4Data ................................................................. 3-4Terminator Byte.................................................. 3-4BCC Byte............................................................. 3-5

    Tag Message Format ...................................................... 3-6Scanner-Only Format ............................................... 3-6

    Prefix Byte........................................................... 3-6Label Identifier ................................................... 3-7Tag Data.............................................................. 3-7PPD ................................................................. 3-7Terminator Byte.................................................. 3-8BCC Byte............................................................. 3-8

    Scanner/Scale Format .............................................. 3-8Prefix Byte........................................................... 3-8Label Identifier ................................................... 3-9

  • Interface Programmers Guide v

    Tag Data.............................................................. 3-9PPD ................................................................. 3-9Terminator Byte ............................................... 3-10BCC Byte........................................................... 3-10

    Using Label Identifiers................................................. 3-11Default Label Identifiers ........................................ 3-11Programmable Common Bytes............................. 3-13Unique Prefix Identifiers ....................................... 3-14

    Using Tag Check Digits ............................................... 3-16

    Chapter 4RS-232 Commands

    Using RS-232 Commands .............................................. 4-1

    Scanner-Only Commands.............................................. 4-2Soft Reset ............................................................ 4-3Hard Reset .......................................................... 4-3Disable Scanner, Red light flashes.................... 4-3Disable Scanner with no indication.................. 4-4Enable Tone ........................................................ 4-4Enable Scanner ................................................... 4-4Disable Good Tone ............................................ 4-4Beep Good Tone................................................. 4-4Configuration Request ...................................... 4-4Device Configuration Request.......................... 4-5Send Status to host............................................. 4-5Start Scanner (7890 only) .................................. 4-5Program (7890 only) .......................................... 4-5Disable Tone....................................................... 4-6Read ROM version number .............................. 4-6

  • vi Interface Programmers Guide

    Not-On-File......................................................... 4-6

    Using the Program Command ...................................... 4-7

    PACESETTER Plus Commands .................................... 4-9Read PACESETTER Tally ...................................... 4-10Reset PACESETTER Tallies ................................... 4-10Enable PACESETTER Plus Mode 3 Trailer .......... 4-11Disable PACESETTER Plus Mode 3 Trailer ......... 4-11

    Scanner/Scale Commands........................................... 4-12Including the Address byte with

    Commands ................................................. 4-12Scanner/Scale Common Commands ................... 4-13

    Hard Reset ........................................................ 4-13Send Status to host........................................... 4-13

    Scanner/Scale Scanner Commands ...................... 4-13Enable Scanner ................................................. 4-14Disable Scanner with no indication ................ 4-14Send Status to host........................................... 4-14Not-On-File....................................................... 4-14Disable Scanner, Red light flashes .................. 4-14

    Scanner/Scale Scale Commands ........................... 4-15Weigh ............................................................... 4-16Cancel ............................................................... 4-17Send Status to host........................................... 4-17Scale Not Ready Status .................................... 4-19Monitor ............................................................. 4-19

    Scanner/Scale Display Commands ...................... 4-20Display LCD data............................................. 4-21Send Status to host........................................... 4-21

    Scanner/Scale Special FunctionCommands ................................................. 4-21

    Model Differences......................................................... 4-23

  • Interface Programmers Guide vii

    7870, 7875, and 7880......................................... 4-237890 ............................................................... 4-24

    Chapter 5OCIA with NCR Scanners

    Using OCIA ................................................................... 5-1

    OCIA Message Structures ............................................. 5-2Messages in OCIA Long Format ............................ 5-2

    Command Message Format.............................. 5-3Tag Message Format.......................................... 5-4

    Messages in OCIA Single Cable LongFormat .......................................................... 5-6

    Command Message Format.............................. 5-6Tag Message Format.......................................... 5-7OCIA Single Cable Long Response

    Format .................................................. 5-10PACESETTER PLUS Differences .......................... 5-11

    Using Label Identifiers with OCIA............................. 5-12

    Interface Requirements and Recommendations........ 5-15Scanner Input Signals ............................................ 5-17Scanner Output Signals ......................................... 5-18

  • viii Interface Programmers Guide

    Chapter 6OCIA Commands

    Using OCIA Commands................................................ 6-1

    Scanner-Only Commands.............................................. 6-2Soft Reset............................................................. 6-3Hard Reset .......................................................... 6-3Disable Scanner, Red light flashes .................... 6-3Disable Scanner with no indication .................. 6-4Enable Tone ........................................................ 6-4Enable Scanner ................................................... 6-4Disable Good Tone............................................. 6-4Beep Good Tone ................................................. 6-4Configuration Request....................................... 6-5Device Configuration Request .......................... 6-5Send Status to host............................................. 6-5Start Scanner ...................................................... 6-5Program ............................................................ 6-6Disable Tone ....................................................... 6-6Read ROM version number .............................. 6-6Not-On-File......................................................... 6-6

    Using the Program Command ...................................... 6-7

    Scanner/Scale Commands............................................. 6-9Including the Address byte with

    Commands ................................................... 6-9Scanner/Scale Common Commands ................... 6-10

    Hard Reset ........................................................ 6-10Send Status to host........................................... 6-10

    Scanner/Scale Scanner Commands ...................... 6-11Enable Scanner ................................................. 6-11Disable Scanner with no indication ................ 6-11

  • Interface Programmers Guide ix

    Send Status to host........................................... 6-12Not-On-File....................................................... 6-12Disable Scanner, Red light flashes.................. 6-13

    Scanner/Scale Scale Commands........................... 6-13Weigh ............................................................... 6-13Cancel ............................................................... 6-14Send Status to host........................................... 6-15Scale Not Ready status .................................... 6-16Monitor ............................................................. 6-16

    Scanner/Scale Display Commands ...................... 6-17Display LCD data ............................................ 6-17Send Status to host........................................... 6-17

    Scanner/Scale Special FunctionCommands ................................................. 6-17

    PACESETTER Plus Commands .................................. 6-20Read PACESETTER Tally...................................... 6-21Reset PACESETTER Tallies................................... 6-22Enable PACESETTER Plus Mode 3 Trailer .......... 6-22Disable PACESETTER Plus Mode 3 Trailer......... 6-22

    Model Differences ........................................................ 6-237870, 7875, and 7880......................................... 6-237890 ............................................................... 6-24Switch Read...................................................... 6-24

    Chapter 7RS-232 Examples

    Constructing RS-232 Messages ..................................... 7-1

    Assembling No Response Commands ......................... 7-2

  • x Interface Programmers Guide

    Creating Commands in a scanner-onlyformat............................................................ 7-2

    Disabling the scanner with noindication................................................ 7-2

    Enabling PACESETTER Plus Mode 3Trailer Data ............................................ 7-3

    Creating commands for a scanner/scale................ 7-4Constructing a Hard Reset message................. 7-4

    Assembling Response Commands ............................... 7-6Creating commands in a scanner-only

    format............................................................ 7-6Sending scanner status to the host

    terminal .................................................. 7-6Reading a PACESETTER Tally ......................... 7-7

    Creating commands for a Scanner/Scale ............... 7-8Requesting Scanner Status ................................ 7-8Getting Weight from the Scale ........................ 7-10Displaying Data on the Screen........................ 7-11

    Processing Tag Messages............................................. 7-12

    Chapter 8OCIA Examples

    Constructing OCIA Messages ....................................... 8-1

    Assembling No Response Commands ......................... 8-2Creating commands in OCIA Long

    Format........................................................... 8-2Sending a Not-On-File to the scanner .............. 8-2

    Creating commands in OCIA Single CableLong Format................................................. 8-3

  • Interface Programmers Guide xi

    Disabling the scanner with noindication................................................ 8-3

    Assembling Response Commands ............................... 8-4Creating commands in OCIA Long

    Format .......................................................... 8-4Sending scanner status to the host

    terminal .................................................. 8-4Creating commands in OCIA Single Cable

    Long Format................................................. 8-5Sending scale status to the host

    terminal .................................................. 8-5

    Appendix ACommands and Message Structures

    Scanner-Only Commands............................................. A-1

    Message Structures ....................................................... A-3

    Response Formats for 7890 Configuration Request andDevice Configuration Commands................... A-5

    Appendix BPACESETTER Plus Data

    PACESETTER Plus Commands ....................................B-1

    PACESETTER Plus Data in Tag Messages...................B-3Decoding Codes(Y and Z) .......................................B-4

    Index ..................................................................................................................I-1

  • xii Interface Programmers Guide

  • Interface Programmers Guide xiii

    Revision Record

    Issue Date Remarks

    A 8/93 First printing

    B 12/93 Corrected pin numbers inconnector chart.

    C 9/97 Complete revision.

  • xiv Interface Programmers Guide

  • Interface Programmers Guide 1-i

    Chapter 1

    Introduction

    Equipment....................................................................... 1-1Slot Scanners............................................................. 1-1Presentation Scanners .............................................. 1-1

    Communication Protocols ............................................. 1-3RS-232 ....................................................................... 1-3OCIA ....................................................................... 1-3

    OCIA NCR Long Format .................................. 1-4OCIA NCR Single Cable Format ...................... 1-4

  • IntroductionEquipment

    Interface Programmers Guide 1-1

    Equipment

    NCR scanners generally fall into two categories; slotscanners and presentation scanners. Both read datafrom bar coded labels; however, the intended use isdifferent in the two types of machines. In addition toscanning capability, some models of slot scanners canbe equipped with a scale. The scale can weigh an objectand convert the weight into usable data for theterminal.

    Slot scanning requires an operator to move labels acrossa laser light. The scanner needs this movement becauseits scan pattern is fixed and can only read a bar codewhen it passes thorough one of the scanner's scan lines.

    Slot scanners are mounted into a checkstand near theterminal. They are used primarily in retail settingswhere a high volume of sales occurs, such as fooddistribution and mass merchandise. These types ofscanners permit an operator to scan a large number ofitems quickly. With slot scanners, you have the optionto add a scale and to add tag diagnostics withPACESETTER Plus.

    Presentation scanners read bar code labels in a new andinteresting way. Because the scan pattern rotates, theoperator only has to present the label to the scannerwith no orientation. Presentation scanners can bemounted in an optional holder. This placement permitshands-free operation, because the operator only has topresent the label of each item in front of the scanner. Attimes when an item is too large to place in front of the

    Slot Scanners

    Presentation Scanners

  • IntroductionEquipment

    1-2 Interface Programmers Guide

    scanner, the unit can be removed from its holder andmoved to the merchandise. Because the scanner iscompact and lightweight, it is highly maneuverable. Itsmoving scan pattern permits quick and accuratescanning.

    The presentation scanner's adaptability makes it aneffective choice for retail applications that encounter awide variety of product shapes and sizes. Departmentstores and specialty stores with diverse inventoriesshould find that the presentation scanner enhances theirproductivity tremendously.

  • IntroductionCommunication Protocols

    Interface Programmers Guide 1-3

    Communication Protocols

    The communication protocols that this manual coversare RS-232 and OCIA. the OCIA versions included arelong format and single cable long format. RS-232 is astandard format and is widely available. Individualsworking with non-NCR terminals most likely use thisprotocol. These versions of OCIA are NCR-developedprotocols. OCIA is the default in most models and isused primarily with NCR host terminals.

    RS-232 is the standard format that is available in mostterminals. The protocol uses 7 or 8 bit ASCII to send tagand scale data to a terminal. RS-232 supports a varietyof bar codes and the options associated with each barcode. In addition, the RS-232 protocol supports evenand odd parity, as well as a BCC byte.

    Note: Using RS-232, you cannot send either 8 bit datawith parity and two stop bits, or 7 bit data with noparity and one stop bit.

    NCR OCIA is an interface developed by NCR. Createdas a protocol for use with NCR scanner/host terminalcombinations, it is the standard format for interfacingbetween NCR scanners and terminals. OCIA has a longhistory with NCR scanners, and is completelysupported.

    OCIA is different from RS-232 because it is an opticallycoupled interface utilizing an optically coupled diode.The communications link between the two devices has

    RS-232

    OCIA

  • IntroductionCommunication Protocols

    1-4 Interface Programmers Guide

    no electrical connection, and therefore, the use of acommon ground is not required.

    OCIA NCR Long Format

    OCIA NCR Long Format is a scanner-only protocol.This format can be used with both slot and presentationtypes of scanners. It supports 8 bit data with no parityand can handle alphanumeric data found in Code 39and Code 128 bar codes.

    OCIA NCR Single Cable Long Format

    OCIA NCR Single Cable Long is the format forscanner/scale machines. Like standard OCIA LongFormat, Single Cable Long Format can handlealphanumeric bar code data. However, unlike standardlong format, it supports 7 bit data with an odd paritybit.

    Note: OCIA Long Format is also called Full Format.Also, label identifiers and tag check digits are fullyprogrammable using OCIA Long Format with a 7890scanner. Refer to Chapter 3, RS-232 MessageStructures for information regarding these options.

    Note: In order to accommodate the alphanumericdata of Code 39 and Code 128 bar codes, systemsoftware that supports these codes must be present inthe host terminal.

  • Interface Programmers Guide 2-i

    Chapter 2

    RS-232 Options

    Terminal/Scanner Setup................................................ 2-1RS-232 Options ......................................................... 2-1

    Baud Rate............................................................ 2-2Parity ................................................................. 2-2Character Length ............................................... 2-2Stop Bits .............................................................. 2-2RTS/CTS Handshake ........................................ 2-3BCC Options....................................................... 2-3Interface Control ................................................ 2-4

    Understanding Your Options........................................ 2-5Model Differences .................................................... 2-5

    VLI and Bit 6 EOM............................................. 2-5

  • RS-232 OptionsTerminal/Scanner Setup

    Interface Programmers Guide 2-1

    Terminal/Scanner Setup

    When you decide to use the RS-232 protocol forcommunications between your NCR scanner and a hostterminal, there are a number of parameters that have tobe set in the scanner. In order for the scanner andterminal to communicate, both devices must have thesame parameter settings. These options give you theability to make your RS-232 communications morereliable by insuring greater data integrity.

    Your responsibility in using the RS-232 interface is to setyour scanner and RS-232 terminal to use the sameparameters. The setting are programmable to give youoptions in your communications. You should use thesame settings to promote ease of use and maintain dataintegrity.

    A number of parameter setting options are availablewith RS-232. These options include the baud rate of datatransmission, parity, character length, stop bits,handshake, BCC, and interface control. RS-232 alsosupports the use of standard label identifiers and givesyou the capability to create unique identifiers.

    RS-232 Options

    Note: Your NCR scanner and RS-232 host deviceshould have the same parameter settings to helpmaintain good communication between the twodevices.

  • RS-232 OptionsTerminal/Scanner Setup

    2-2 Interface Programmers Guide

    Baud Rate

    RS-232 gives you the following baud rate options forscanner/terminal communication. Remember that bothdevices must communicate at the same speed.

    300 600 1200 2400 4800 9600 19200

    Parity

    The following parity options are available with RS-232communication:

    Odd, Even, or None

    Character Length

    RS-232 supports character lengths of 7 or 8 bits. Thischoice is determined by the terminal that you areconnecting to the scanner.

    Stop Bits

    In using RS-232, you have the choice of operating with 1or 2 stop bits. The following are the rules regardingtheir use:

    If you select 7 bit character length with no parity,two stop bits are sent by the scanner and must bereceived.

    Note:When setting up communication using an NCRscanner/scale, you must select parity. If you select noparity, the scanner/scale uses odd parity in itscommunications with the host terminal.

  • RS-232 OptionsTerminal/Scanner Setup

    Interface Programmers Guide 2-3

    If you select 8 bit character length and parity, onlyone stop bit is used.

    RTS/CTS Handshake

    RS-232 permits the following options for controllingdata exchange between devices with RTS/CTS:

    RTS Low, CTS ignored

    RTS High, CTS ignored

    Raise RTS, wait for CTS

    Raise RTS, ignore CTS

    RTS Low, wait fro CT

    RTS High, wait for CTS

    RTS identifies a Request To Send line, while CTS is theClear To Send line. The scanner raises RTS and theterminal responds by raising CTS when it is ready toreceive.

    BCC Options

    RS-232 gives you the ability to Enable or Disable theBlock Check Characters (BCC). In scanner-only modelsthe default is Disable the BCC byte, while inscanner/scale models, the default is Enable. You canchange either of these default settings. The BCC byte isthe exclusive or of all bytes in a message except theprefix byte and it uses parity.

    Note: NCR recommends that you use handshakingbecause without it you can lose data between theterminal and the scanner without receiving anyindication from the terminal.

  • RS-232 OptionsTerminal/Scanner Setup

    2-4 Interface Programmers Guide

    Interface Control

    In determining how to control RS-232 interface betweenyour terminal and your NCR scanner, you have thefollowing options:

    None

    ACK/NAK

    XON/XOFF

    The interface control options are not necessary for RS-232 communications, thus the selection of no interfacecontrol is a legitimate choice. Remember that theterminal and the scanner must have the same settings.

    Note: Scanner/scales have a fixed acknowledgeformat for many of the messages sent to them. Suchacknowledgments take precedence over an ACK.Also, note that an ACK is not sent to a resetcommand. A NAK message can be sent, however.Furthermore, you should note that any scanner/scaleacknowledgment is considered a message and mustreceive an ACK or NAK from the host terminal inresponse.

  • RS-232 OptionsUnderstanding Your Options

    Interface Programmers Guide 2-5

    Understanding Your Options

    Your application program should be able to open thecommunication port for these options. This gives youthe ability to change parameter settings internally.

    RS-232 gives you a high level of flexibility and controlover terminal/scanner communications. If you selectRS-232 as the communication protocol that you plan touse in your application program, you cannot ignorethese options. Before you select any of the options, findout what RS-232 selections are present in your hostterminal. When you know how your terminalcommunicates in RS-232, then you can determine whatscanner selections are appropriate for your application.

    The 7870, 7875, 7880, and 7890 scanner models allsupport these options with some exceptions. The 7890has two additional parity options in Mark and Space,and VLI and EOM options are available.

    VLI and Bit 6 EOM

    The Variable Length Indicator (VLI) and Bit 6 End ofMessage (EOM) parameters are two additional RS-232options available to the 7890 scanner. These optionspermit you to identify the length, or end, of eachmessage sent to the terminal. Use of VLI or EOMremoves the need to send a terminating character.

    The VLI includes itself and all bytes through the BCC. Itimmediately follows the Prefix Byte. If you do not use aPrefix Byte, the VLI is the first byte in the data message.Figure 2-1 presents possible placements for the VLI.

    Model Differences

  • RS-232 OptionsUnderstanding Your Options

    2-6 Interface Programmers Guide

    Prefix Byte VLI . . . . . . . . . . . . . . . . . . .

    If you select to use a Prefix Byte, the VLI immediatelyfollows, otherwise the VLI is the first byte of themessage as shown in the following

    VLI . . . . . . . . . . . . . . . . . . . . . . .

    Bit 6 EOM identifies the end of a message. If you selectto use this option, Bit 6 of the last byte in the messagedetermines the end of the message. When you use EOMand VLI, you are no longer required to use aterminating character in your messages.

    Figure 2-1Placement of VLI

    Note: NCR recommends that you not use theseoptions with your RS-232 communications becausethey remove full alphanumeric capability and it ispossible for the VLI to be the same as a protocolcharacter.

  • Interface Programmers Guide 3-i

    Chapter 3

    RS-232 Message Structures

    Command Message Format .......................................... 3-1Scanner-Only Format............................................... 3-1

    Prefix Byte .......................................................... 3-2Function Code.................................................... 3-2Data ................................................................. 3-2Terminator Byte ................................................. 3-3BCC Byte............................................................. 3-3

    Scanner/Scale Format.............................................. 3-3Prefix Byte .......................................................... 3-3Address Byte ...................................................... 3-4Function Code.................................................... 3-4Data ................................................................. 3-4Terminator Byte ................................................. 3-4BCC Byte............................................................. 3-5

    Tag Message Format ...................................................... 3-6Scanner-Only Format............................................... 3-6

    Prefix Byte .......................................................... 3-6Label Identifier ................................................... 3-7Tag Data.............................................................. 3-7PPD ................................................................. 3-7Terminator Byte ................................................. 3-8BCC Byte............................................................. 3-8

    Scanner/Scale Format.............................................. 3-8Prefix Byte .......................................................... 3-8

  • 3-ii Interface Programmers Guide

    Label Identifier ................................................... 3-9Tag Data.............................................................. 3-9PPD ................................................................. 3-9Terminator Byte................................................ 3-10BCC Byte........................................................... 3-10

    Using Label Identifiers ................................................. 3-11Default Label Identifiers ........................................ 3-11Programmable Common Bytes ............................. 3-13Unique Prefix Identifiers ....................................... 3-14

    Using Tag Check Digits ............................................... 3-16

  • RS-232 Message StructuresCommand Message Format

    Interface Programmers Guide 3-1

    Command Message Format

    Note: All characters are written in hexadecimal (Hex)format. All ASCII characters have double quotationmarks around them.

    The command message format is the structure forcreating RS-232 commands with supported functioncodes. Use this format to instruct the scanner to performa desired function. The message structure for tag data isdifferent and is explained later in this chapter.

    Characters sent are all ASCII and utilize the full ASCIIset available for each bar code. For example, onlynumeric characters are used for UPC/EAN bar-codeddata.

    Your scanner verifies the terminal BCC. Likewise, yourapplication should verify the scanner BCC.

    Figure 3-1 is the command message format for systemswith a scanner-only configuration. The message mapcontains all the necessary components.

    Note: Optional items in the message diagramsillustrated throughout this chapter are highlighted ingray shading like this:

    Scanner-Only Format

  • RS-232 Message StructuresCommand Message Format

    3-2 Interface Programmers Guide

    Prefix Byte Function Code Data Terminator Byte BCC Byte

    Prefix Byte

    The prefix byte is an optional part of the message, butNCR recommends that you include it in your messageconstructions. The default prefix byte is an "STX" (02).

    Function Code

    In the function code portion of the message, insert acommand from the RS-232 list of commands in Chapter4, RS-232 Commands. This directs the scanner to executethe function you have chosen. The host terminal is theonly device that can issue a command. Keep in mindthat the scanner may or may not respond to thecommand initiated by a function code. Some functioncodes demand responses from the scanner, while othersdo not.

    Note: Function codes are not included in tag datamessages that are sent to the host terminal.

    Data

    Data bytes are not a required component of allmessages. The data bytes that are sent depend on thefunction code or command. Most command messagesdo not include data.

    Figure 3-1Scanner-Only Command MessageFormat

  • RS-232 Message StructuresCommand Message Format

    Interface Programmers Guide 3-3

    Terminator Byte

    Any byte can be used as a terminator, however, NCRrecommends that you use an RS-232 control character.Examples of these are: "ETX" (03), "EOT" (04), or "CR"(0D).

    Note: NCR recommends that you not use alphanumericcharacters, because they could be present in the data.

    BCC Byte

    The BCC byte is an optional part of the message. It is theexclusive or of all bytes in a message except for theprefix byte.

    Figure 3-2 is the command message format for systemswith a scanner/scale configuration. The message mapcontains all necessary components.

    Prefix Byte Address Byte Function Code Data Terminator Byte BCC Byte

    Prefix Byte

    The prefix byte is an optional part of the message, butNCR recommends that you include it in your messageconstructions. The default prefix byte is an "STX" (02).

    Scanner/Scale Format

    Figure 3-2Scanner/Scale Command MessageFormat

  • RS-232 Message StructuresCommand Message Format

    3-4 Interface Programmers Guide

    Address Byte

    The address byte is a necessary structural componentthat determines the specific device within thescanner/scale that receives the message. Each address isthe logical address that is common in all firmware. Thefollowing is a list of valid addresses.

    Scanner (30)

    Scale (31)

    Display (32)

    Special Function Address (33)

    Function Code

    The function code portion of the message is where youinclude a command from the RS-232 list of commandsfeatured in Chapter 4, RS-232 Commands, in order tohave the scanner or scale perform some function.Commands can be single or multiple bytes and areissued only by the host terminal.

    Note: Function codes are not included on tag datamessages that are sent to the host terminal.

    Data

    Data bytes are not a required component of allmessages. The data bytes that are sent depend on thefunction code or command. Most commands do notinclude data.

    Terminator Byte

    Unlike the command message structure for scanner-only systems, messages in scanner/scale systems must

  • RS-232 Message StructuresCommand Message Format

    Interface Programmers Guide 3-5

    include a terminator byte. You must include aterminator byte because the host needs to know whichbyte is the last in a message. NCR recommends that youuse RS-232 control characters for the terminator byte.Examples of such control characters are: "ETX" (03),"EOT" (04), or "CR" (0D). Still, any byte can be used asthe terminator byte of a message.

    Note: NCR recommends that you not usealphanumeric characters, because they could be presentin the data.

    BCC Byte

    The BCC byte is optional and it is the exclusive or of allbytes in a message except for the prefix byte. The BCCbyte is enabled as the default on scanner/scales, but itcan be disabled by programming. NCR does, however,recommend that you use a BCC byte to help maintaindata integrity.

  • RS-232 Message StructuresTag Message Format

    3-6 Interface Programmers Guide

    Tag Message Format

    The tag message format is the structure that is used bythe scanner to send tag data from bar-coded labels to ahost terminal through the communications link. Thissection clarifies the structure of these messages so thatyou can set up an application program to expect tagdata in this format.

    Note: The memory buffer in the scanner holds onlytwo tags. Once it is filled, if tags are not transmitted, thescanner no longer reads tags. Also, be aware that whenthe scanner is enabled, tag data can be sent to theterminal at any time.

    Figure 3-3 is the tag message format for systems with ascanner-only configuration. The message map containsall necessary components.

    Prefix Byte Label Identifier Tag Data PPD Terminator Byte BCC Byte

    Prefix Byte

    In the scanner-only tag message format, the prefix byteis optional. NCR, however, recommends that you usethe prefix.

    Scanner-Only Format

    Figure 3-3Scanner-Only Tag MessageStructure

  • RS-232 Message StructuresTag Message Format

    Interface Programmers Guide 3-7

    Label Identifier

    The label identifier field is optional. Label identifiersand the structure for each type of tag data are discussedin the next section.

    Tag Data

    Tag data contains the contents of the label as read by thescanner. The structure for tag data is given in the nextsection of this chapter.

    PPD

    PPD stands for the PACESETTER Plus data field. Itconsists of PACESETTER Plus Mode 3 Trailer data.PACESETTER Plus data is an optional field which isonly available with UPC or EAN tag data; it can only beused with scanner models that are equipped withPACESETTER Plus capability. The PPD can be enabledand disabled by the Enable PACESETTER Plus Mode 3Trailer and the Disable PACESETTER Plus Mode 3Trailer commands that are issued from the terminal, orby programming the scanner. You can find allPACESETTER Plus commands in Chapter 4, RS-232Commands.

    The PACESETTER Plus data field of the tag datamessage has a specific structure. The format forPACESETTER Plus data is the following.

    43 3Y 3Z

    Note: Refer to Appendix B, PACESETTER Plus Datafor information regarding the interpretation ofPACESETTER Plus data contained in Y and Z.

  • RS-232 Message StructuresTag Message Format

    3-8 Interface Programmers Guide

    As with the entire tag message, your applicationprogram must expect PACESETTER Plus data in thisformat.

    Terminator Byte

    Although the terminator byte is not required forsending tag data, if the scanner is going to acceptcommands, the terminator byte must be included in themessage. The terminator byte is necessary because itsignifies the end of a message.

    BCC Byte

    The BCC byte is an optional part of the message. It isthe exclusive or of all bytes in a message except for theprefix byte.

    Figure 3-4 is the tag message format for systems with ascanner/scale configuration. The message map containsall necessary components.

    Prefix Byte 30 38 Label Identifier Tag Data PPD Terminator Byte BCC Byte

    Prefix Byte

    In the scanner/scale tag message format, the prefix byteis optional. NCR, however, recommends that you usethe prefix.

    30 and 38

    Scanner/Scale Format

    Figure 3-4Scanner/Scale Tag MessageFormat

  • RS-232 Message StructuresTag Message Format

    Interface Programmers Guide 3-9

    30 is the scanner address, and 38 is the function codethat indicates tag data follows. As with the commandmessage format for scanner/scale configurations, thetag message must include an address byte. Since theaddress is constant in this message format, the addressbyte never changes.

    Label Identifier

    The label identifier field is optional. Label identifiersand the structure for each type of tag data are discussedin the next section.

    Tag Data

    Tag data contains the contents of the label as read by thescanner. The structure for tag data is given in the nextsection of this chapter.

    PPD

    PPD is the PACESETTER Plus data field. It consists ofPACESETTER Plus Mode 3 Trailer data. PACESETTERPlus data is an optional field which is only availablewith UPC or EAN tag data; it can only be used withscanner models that are equipped with PACESETTERPlus capability. The PPD can be enabled and disabledby the Enable PACESETTER Plus Mode 3 Trailer andthe Disable PACESETTER Plus Mode 3 Trailercommands that are issued from the terminal, or byprogramming the scanner. You can find allPACESETTER Plus commands in Chapter 4, RS-232Commands.

  • RS-232 Message StructuresTag Message Format

    3-10 Interface Programmers Guide

    The PACESETTER Plus data field of the tag datamessage has a specific structure. The format forPACESETTER Plus data is the following.

    43 3Y 3Z

    As with the entire tag message, your applicationprogram must expect PACESETTER Plus data in thisformat.

    Terminator Byte

    With the scanner/scale, the terminator byte is anecessary component of the message structure. Used bythe scanner to determine the end of a message, it isnecessary because the scanner must be able to send andreceive messages.

    BCC Byte

    The BCC byte is an optional part of the message. It is theexclusive or of all bytes in a message except for theprefix byte.

    Note: Refer to Appendix B, PACESETTER Plus Datafor information regarding the interpretation ofPACESETTER Plus data contained in Y and Z.

  • RS-232 Message StructuresUsing Label Identifiers

    Interface Programmers Guide 3-11

    Using Label Identifiers

    Each bar code that is used with RS-232 has an optionalprefix label identifier that is associated with that barcode. With RS-232, you have the option to select a labelidentifier to be sent with your tag data messages. Thelabel identifier precedes tag data as indicated in theprevious section of this chapter

    In using label identifiers with RS-232, you have severallevels of choices. NCR scanners give you the ability toselect the default label identifiers, unique prefixidentifiers, or no label identifiers. In addition, you havetwo programmable common byte options.

    Both the default label identifiers and the uniqueidentifiers have changeable options.

    The following table provides all available bar codes, thelabel identifiers for the bar codes, and the structure fortag data in each format.

    Note: Label identifiers and tag check digits are fullyprogrammable when you are using OCIA LongFormat with the 7890 presentation scanner.

    Default LabelIdentifiers

  • RS-232 Message StructuresUsing Label Identifiers

    3-12 Interface Programmers Guide

    Bar CodeType

    LabelIdentifiers

    StructuresFor Tag Data(Y = add-on digit)

    UPC-A 41 NS X1 X2 X3 X4 X5 X6 X7 X8 X9X10 CK

    UPC-A + 2(periodicals)

    41 NS X1 X2 X3 X4 X10 CK Y1 Y2

    UPC-A + 5(couponsandperiodicals)

    41 NS X1 X2 X3 X4 X10 CK Y1 Y2Y3 Y4 Y5

    UPC-A +Code 128(coupons)

    42 3341

    38 31 30 X1 X2 X3 X4 35 X1 X2X3 X4 X10 CK

    UPC-D 44 3X NS X1 X2 X3 X4. . .

    UPC-E 45 30 X1 X2 X3 X4 X5 X6

    EAN-8 46 46 X1 X2 X3 X4 X5 X6 X7 CK

    EAN-13 46 X1 X2 X3 X4 X5 X6 X7 X8 X9 X10X11 X12 CK

    EAN-13 + 5(couponswith 99)

    46 39 39 X1 X2 X3 X4 X12 CK Y1Y2 Y3 Y4 Y5

    EAN-13 +128(couponswith 99)

    42 33 46 38 31 30 X1 X2 X3 X4 39 39 X1X2 X3 X4 X12 CK

    Code 39 42 31 X1 X2 X3 X4

  • RS-232 Message StructuresUsing Label Identifiers

    Interface Programmers Guide 3-13

    Bar CodeType

    LabelIdentifiers

    StructuresFor Tag Data(Y = add-on digit)

    Interleaved2 of 5

    42 32 X1 X2 X3 X4

    Code 128 42 33 X1 X2 X3 X4

    The 3X in the UPC-D label identifier represents the fieldfor the UPC-D version number. This field can be 31through 35 and it is optional.

    The table shows you what label identifiers and whatmessage structures for tag data to expect if you selectthe default prefix label identifiers. You must programthe terminal to expect data in this format if you plan touse the default setting.

    As you are programming with common bytes, you havethe following options.

    None

    Common Byte 1

    Common Byte 2

    Both Common Bytes

    Note: Unique prefixes can be programmed to use one,two, or no common bytes. UPC-D users should alsonote that an additional byte can be used to indicate theUPC-D version number. The version number is sent inASCII. For example, "1" would be 31.

    ProgrammableCommon Bytes

  • RS-232 Message StructuresUsing Label Identifiers

    3-14 Interface Programmers Guide

    Unique prefix identifiers always precede the bar codedata in a tag message. In addition, common bytesprecede the unique identifier that you select. Figure 3-5illustrates the correct placement of unique identifiersand common bytes in tag messages.

    Bar Code Data

    Unique Identifier Bar Code Data

    Common Byte 1 Unique Identifier Bar CodeData

    Common Byte 2 Unique Identifier Bar CodeData

    Common Byte 1 Common Byte 2 UniqueIdentifier

    Bar CodeData

    In addition to programmable common bytes, you haveflexibility in selecting unique prefix identifiers. As withthe default label identifiers, each bar code has a uniqueprefix identifier that is associated with it. These areprovided in following table. The selections are given tohelp guide you in your choices and can be changed.There are a number of options available to users ofunique prefix identifiers. You can find these options inthe user's or programmer's guide for your model.

    Unique PrefixIdentifiers

    Figure 3-5Unique Label Identifier Formats

    Note: The UPC-D version number always precedesbar code data and follows the unique identifier.

  • RS-232 Message StructuresUsing Label Identifiers

    Interface Programmers Guide 3-15

    Bar Code Type UniqueByte

    Common Byte Used

    HEX ASCII

    UPC-A 41 A None

    UPC-D 44 D None

    UPC-E 45 E None

    EAN-8 46 F None

    EAN-13 47 G None

    Code 39 31 1 2

    Interleaved

    2 of 5 32 2 2

    Code 128 33 3 2

    Note: In addition to the options discussed under thethree previous headings, you have the option to setyour scanner so that no label identifiers are sent withtag data.

  • RS-232 Message StructuresUsing Tag Check Digits

    3-16 Interface Programmers Guide

    Using Tag Check Digits

    With the various bar codes that are available to RS-232communications, a number of tag check digit optionsexist. The tag check digit options are listed below.

    Note: Label identifiers and tag check digits are fullyprogrammable when you are using OCIA Long Formatwith the 7890 presentation scanner.

    Disable with UPC and EAN bar codes.

    Enable with UPC-A, EAN-8, and EAN-13. Disablewith UPC-E.

    Disable with UPC-A, EAN-8, and EAN-13. Enablewith UPC-E.

    Enable with UPC and EAN bar codes.

    In addition, the Code 39 and Interleaved 2 of 5 bar codeshave optional tag check digits as explained in the user'sor programmer's guide for your model.

  • Interface Programmers Guide 4-i

    Chapter 4

    Using RS-232 Commands

    Using RS-232 Commands .............................................. 4-1

    Scanner-Only Commands.............................................. 4-2Soft Reset ............................................................ 4-3Hard Reset .......................................................... 4-3Disable Scanner, Red light flashes.................... 4-3Disable Scanner with no indication.................. 4-4Enable Tone ........................................................ 4-4Enable Scanner ................................................... 4-4Disable Good Tone ............................................ 4-4Beep Good Tone................................................. 4-4Configuration Request ...................................... 4-4Device Configuration Request.......................... 4-5Send Status to host............................................. 4-5Start Scanner (7890 only) .................................. 4-5Program (7890 only) .......................................... 4-5Disable Tone....................................................... 4-6Read ROM version number .............................. 4-6Not-On-File......................................................... 4-6

    Using the Program Command...................................... 4-7

  • 4-ii Interface Programmers Guide

    PACESETTER Plus Commands .................................... 4-9Read PACESETTER Tally ...................................... 4-10Reset PACESETTER Tallies ................................... 4-10Enable PACESETTER PlusMode 3 Trailer ........... 4-11Disable PACESETTER Plus Mode 3 Trailer ......... 4-11

    Scanner/Scale Commands........................................... 4-12Including the Address byte with

    Commands ................................................. 4-12Scanner/Scale Common Commands ................... 4-13

    Hard Reset ........................................................ 4-13Send Status to host........................................... 4-13

    Scanner/Scale Scanner Commands ...................... 4-13Enable Scanner ................................................. 4-14Disable Scanner with no indication ................ 4-14Send Status to host........................................... 4-14Not-On-File....................................................... 4-14Disable Scanner, Red light flashes .................. 4-14

    Scanner/Scale Scale Commands ........................... 4-15Weigh ............................................................... 4-16Cancel ............................................................... 4-17Send Status to host........................................... 4-17Scale Not Ready Status .................................... 4-19Monitor ............................................................. 4-19

    Scanner/Scale Display Commands ...................... 4-20Display LCD data............................................. 4-21Send Status to host........................................... 4-21

    Scanner/Scale Special FunctionCommands ................................................. 4-21

    Model Differences......................................................... 4-237870, 7875, and 7880......................................... 4-237890 ............................................................... 4-24

  • RS-232 CommandsUsing RS-232 Commands

    Interface Programmers Guide 4-1

    Using RS-232 Commands

    The command byte exists as the function code portionof messages from the host terminal to the scanner. Theformat for these types of command messages is given inthe first two sections of Chapter 3, RS-232 MessageStructures.

    As the application programmer, you must havemethods for controlling the operation of the scanner.The commands discussed in this chapter give you theability to manipulate the scanner by directing it toperform necessary functions. It is with these commandsthat you control the scanner through the RS-232communications link managed by your applicationprogram.

    Note: All command codes are shown without parity.In addition, there are timing restrictions that apply toresets and commands that receive responses. Youshould not send another command after a reset until aninterval of at least 2 seconds has elapsed. Thisrestriction permits the scanner to reset before it receivesadditional commands. When issuing commands thatrequire a response, your terminal should not sendanother command until the response has been received.The response should be immediate. The exception is theweigh command in scanner/scales.

  • RS-232 CommandsScanner-Only Commands

    4-2 Interface Programmers Guide

    Scanner-Only Commands

    The table that is presented below gives you adescription of each command that is available to RS-232communications in a scanner-only configuration, aswell as the command byte that you insert as thefunction code of your terminal-to-scanner messages.

    Command Description Function Codes

    Soft Reset, No indication 32 30

    Hard Reset 32 31

    Disable Scanner, Red light flashes 32 42

    Disable Scanner with no indication 32 44

    Enable Tone 32 46

    Enable Scanner (early 7870s do notsupport this command)

    32 33

    Beep Good Tone 33 34

    Configuration Request (7890-0200) 30 41

    Device Configuration Request (7890-0200)

    30 42

    Send Status to host 33 36

    Start Scanner (7890 only) 33 38

  • RS-232 CommandsScanner-Only Commands

    Interface Programmers Guide 4-3

    Command Description Function Codes

    Program (7890 only) 33 45

    Disable Tone 33 39

    Read ROM version number 33 31 30 32 3030

    Not-On-File 33 46

    Note: The PACESETTER Plus commands are alsoscanner-only commands. They are presented in thischapter under PACESETTER Plus Commands. Inaddition, the four byte data field for the Read ROMversion number is included.

    Warning Asynchronous use of the resetcommands can cause you to lose data.

    The soft reset command clears the scanner's decodebuffer. This command prepares the scanner for readingtags by allowing it to accept decode data after the reset.The terminal receives no acknowledgment to thiscommand.

    The hard reset causes the scanner to go through itsinitial power up sequence. No acknowledgment is sentas a response to this command, and all data in thescanner is lost.

    This command directs the scanner to turn off the laserand prevent the scanner from processing new tag datafor the host terminal. The red flashing status indicatorshows that this mode has been engaged. To recover

    Soft Reset

    Hard Reset

    Disable Scanner,Red light flashes

  • RS-232 CommandsScanner-Only Commands

    4-4 Interface Programmers Guide

    from a disable scanner mode, one of the two resetcommands or an enable command must be sent to thescanner.

    This command performs the same functions as theprevious disable command; however, it gives theoperator no indication that it is in this mode. Recoveryis the same for both disable commands.

    The Enable tone command enables the sounding of thescanner's good read tone. This command recovers thescanner from any tone disable command.

    The Enable Scanner command enables the scanner forreading labels. Use this command to enable the scannerafter a Not-On-File or Disable command has shut itdown.

    Note: This command is available in all scannersEXCEPT early 7870s.

    The Disable Good Tone command disables thesounding of the scanner's good read tone. The scanner'stone no longer sounds when the scanner sends a goodread to the terminal.

    The Beep Good Tone command directs the scanner tosound the good read tone for the default period of time.

    The response from the device for this commandcontains basic information about the unit such as theClass #, Firmware Part and Firmware version numbers.

    Disable Scanner withno indication

    Enable Tone

    Enable Scanner

    Note: Be aware that when the scanner is enabled,tag data can be sent to the terminal at any time.Disable Good Tone

    Beep Good Tone

    Configuration Request

  • RS-232 CommandsScanner-Only Commands

    Interface Programmers Guide 4-5

    The response from the device for this commandcontains particular information for the type of scannersuch as symbologies, configuration default, displayconfiguration, state of the unit, good tone parameters,etc.

    Note: For more detailed information about theresponses for the Configuration Request and DeviceConfiguration Request, see Appendix A.

    The Send Status command asks the scanner to send itscurrent status to the host terminal. Valid responsesfrom the scanner are presented in the following table.

    Scanner Status Response Codes

    Normal Mode (30) 33 30

    Disable Mode (2B) 32 42

    Toad Mode (3A) 33 41

    Use this command to turn the scanner on withouthaving to present a tag to the scan window. Thiscommand can be sent to the scanner at the start of atransaction. Also, in order to use this command, thescanner must be enabled.

    Use this command to program the scanner just as youwould using tags. For an example of how to use thisprogram method, see Using the Program Commandin this chapter. Valid responses from the scanner areshown in the following table.

    Device ConfigurationRequest

    Send Status to host

    Start Scanner(7890 Only)

    Program(7890 Only)

  • RS-232 CommandsScanner-Only Commands

    4-6 Interface Programmers Guide

    Scanner Status Description Response Codes (Hex)

    Good 30

    Failed 31

    Scanner not in disable mode 32

    Use this command to disable the tone on the scanner.The scanner's tone does not sound until an enable toneis issued by the terminal.

    Use this command to read the ROM version numberfrom the scanner. The scanner sends 30 bytes containingthe version number from PROM in response to thismessage.

    Note: This data is sent in a special format where eachbyte is sent one nibble (4 bits) at a time. A Hex character34 byte would be broken into nibbles and sent as first 33and then 34.

    Use this command to disable the scanner when a label isread that is not on file in the terminal. The commanddisables the scanner, causes the red light to flash, andsounds the tone. As with any disable mode, you need touse a reset or an enable command to bring the scannerback to normal operation.

    Disable Tone

    Read ROM versionnumber

    Not-On-File

  • RS-232 CommandsUsing the Program Command

    Interface Programmers Guide 4-7

    Using the Program Command

    The Program command causes the NCR scanner tointerpret the data in the message as information toprogram itself. The scanner must be in the disablemode for the scanner to act on the message.

    The command format for Program is:

    Prefix Byte FC1 FC2 Data Terminator Byte BCC Byte

    To create a Program command message:

    1. Select the prefix byte, if enabled.

    2. Select and insert function code 33H 45H.

    3. Enter the data that is to be sent from the host to thescanner. The following table contains examples oftag data you can send to the host.

    Tag Data sent (Hex)

    End 51H N

    Save and Reset 53H S

    Hex 0 -Hex F 30H - 3FH or 30H - 39H, 41H - 46H

  • RS-232 CommandsUsing the Program Command

    4-8 Interface Programmers Guide

    4. Insert the terminator byte.

    5. Add the BCC byte, if enabled. (The BCC byte is anexclusive OR of all bytes in the message except theprefix byte.)

    The following is an example of what a Programmessage would look like.

    02 33 45 16221C32310DS 03 E

    PrefixByte

    FC1 FC2 Data TerminatorByte

    BCCByte

    This example programs the scanner for no labelidentifiers, check digits sent with all UPC/EAN labels,and CR (0DH) for terminator.

    (The ASCII data in the example would be 31, 36, 32, 32,31, and so on in Hex).

    Note: If the last character is an S, no response isprovided unless there is an error in the data. If thepower -up message is enabled, this is sent aftersuccessfully completing power-up diagnostics.

  • RS-232 CommandsPACESETTER Plus Commands

    Interface Programmers Guide 4-9

    PACESETTER PlusCommands

    The following table gives the available PACESETTERPlus commands.

    Command Description Function Codes

    Read PACESETTER Tally

    (3X = 31 to 35 -- Code for type ofread)

    3D 32 3X

    Reset PACESETTER Tallies 3D 3C

    Enable PACESETTER Plus Mode 3Trailer Tallies

    3D 3E 3E

    Disable PACESETTER Plus Mode 3Trailer Tallies

    3D 3F 3F

    The 3X portion of the function code byte in the ReadPACESETTER Tally stands for the type of tally thatyou want sent to the host terminal. The following tableshows the available PACESETTER tallies.

    Tallies Codes

    Good Reads 31

    No reads due to lack of a full label 32

  • RS-232 CommandsPACESETTER Plus Commands

    4-10 Interface Programmers Guide

    Tallies Codes

    Good reads with very highlyoverprinted bars

    33

    Good reads with very highlyunderprinted bars

    34

    Good reads with missing margins 35

    The four commands that you can use in yourapplication program to access and controlPACESETTER Plus data are described below.

    The Read PACESETTER Tally command directs thescanner to output the tally that the terminal requested.The response sent back to the terminal is in thefollowing format.

    3D 3X 3Y 3Y 3Y 3Y 3Y 3Y 3Y

    Note: This message does not show the prefix,terminator, or BCC bytes.

    The 3X stands for the code number of the tallyrequested, while 3Y stands for the value of the tally.Notice that all numbers are sent in ASCII.

    The Reset PACESETTER Tallies command causes thescanner to reset the PACESETTER tallies. The memorybuffer that holds this data is cleared.

    Read PACESETTERTally

    Reset PACESETTERTallies

  • RS-232 CommandsPACESETTER Plus Commands

    Interface Programmers Guide 4-11

    The Enable PACESETTER Plus Mode 3 Trailercommand permits trailer PACESETTER Plus data to besent with each UPC or EAN tag read. With thiscommand, tag quality information is sent to the hostand can be stored for quality analysis. Trailer data issent in the format 43 3Y 3Z. Refer to Appendix B,PACESETTER Plus Data for information regarding theinterpretation of PACESETTER Plus data in Y and Z.

    The Disable PACESETTER Plus Mode 3 Trailercommand prevents trailer data from being sent with tagreads.

    Note: To use PACESETTER Plus commands with ascanner/scale, add the special function address byte(33) to the message. The address and command portionof a message to Reset PACESETTER Tallies would be 333D 3C. PACESETTER Plus is an optional feature. It isonly available in models that have been equipped withPACESETTER Plus at the factory.

    EnablePACESETTER PlusMode 3 Trailer

    DisablePACESETTER PlusMode 3 Trailer

  • RS-232 CommandsScanner/Scale Commands

    4-12 Interface Programmers Guide

    Scanner/Scale Commands

    The following commands are supported by NCRscanner/scale models. Notice that when you createmessages with these commands, you must alwaysinclude an address byte before the function code in themessage structure. The examples in this section do notinclude parity, the prefix byte, or the BCC byte in theirdescriptions. Chapter 3, RS-232 Message Structures givesyou the format for including these components in yourmessage structure.

    Note: Scanner/scale models respond to commands inscanner-only format and with an address byte of 33.

    In order for your scanner/scale to respond to thecommands that you send through the host terminal, allfunction codes must be preceded by an address byte.When constructing command messages, use theaddress of the peripheral device to receive the messageas the address byte portion of your message. Thefollowing table provides a list of devices that receivecommands and their corresponding addresses.

    Devices Address

    Scanner 30

    Scale 31

    Display 32

    Special Function 33

    Including the Addressbyte with Commands

  • RS-232 CommandsScanner/Scale Commands

    Interface Programmers Guide 4-13

    Common commands can be sent to any device in thescanner unit. The two common commands that areavailable are listed in the following table.

    Command Description Function Codes

    Hard Reset 30

    Send Status to host 33

    Hard Reset

    The Hard Reset command causes the scanner to gothrough its initial power up sequence. Noacknowledgment is sent as a result of this command.

    Send Status to host

    The Send Status to host command asks the device tosend its current status to the host terminal. Since theresponse message format changes depending on thedevice addressed by the command, each commandsection features the Send Status to host command.

    Your application program can send these commandsfrom the terminal to control the operation of only thescanner. The commands listed in the following tablemust be preceded by an address byte of 30.

    Command Description Function Codes

    Enable Scanner 31

    Disable Scanner with no indication 32

    Send Status to host 33

    Scanner/ScaleCommon Commands

    Scanner/ScaleScanner Commands

  • RS-232 CommandsScanner/Scale Commands

    4-14 Interface Programmers Guide

    Command Description Function Codes

    Not-On-File 35

    Disable Scanner, Red light flashes 36

    Enable Scanner

    The Enable Scanner command permits the scanner tosend tag data to the host terminal. You can use thecommand to bring the scanner back into normaloperation mode after a Not-On-File or Disable with orwithout indication command has been issued. Thecommand is acknowledged with the standardacknowledgment message (30 30).

    Note: Be aware that when the scanner is enabled, tagdata can be sent to the terminal at any time.

    Disable Scanner with no indication

    The Disable Scanner with no indication commanddisables the scanner by preventing it from sending tagdata to the terminal. This disable function gives theoperator no indication that the scanner is in a disablemode. To recover from a disable mode, the terminalmust send an Enable Scanner or Reset command. Thescanner acknowledges this command with the standard30 30.

    Send Status to host

    The Send Status to host command asks the scanner tosend its current status to the host terminal. Theresponse message is in the following format.

    30 33 3W 3X 3Y 3Z

  • RS-232 CommandsScanner/Scale Commands

    Interface Programmers Guide 4-15

    The four data bytes return the status of the scanner.Possible responses for the data bytes are listed in thetable below.

    Data Bytes Response Description Codes

    3W Not-On-File Enabled 30

    3X Gateless Scanner 31

    3Y Scanner Disabled 30

    Scanner Enabled 31

    3Z No Scan Data Present 30

    Not-On-File

    The Not-On-File command disables the scanner when alabel is read that is not on file in the terminal. Thecommand disables the scanner and causes the red lightto flash and the tone to sound. As with any disablemode, you need an Enable Scanner or a Reset commandto bring the scanner back to normal operation.

    Disable Scanner, Red light flashes

    The Disable Scanner, Red light flashes commanddisables the scanner and alerts the operator by flashingthe red light on the scanner. An Enable Scanner or Resetcommand brings the scanner unit back to normaloperation.

    Your application program sends these commands fromthe terminal to control the operation of the scale. Thecommands listed in the following table must bepreceded by an address byte of 31.

    Scanner/Scale ScaleCommands

  • RS-232 CommandsScanner/Scale Commands

    4-16 Interface Programmers Guide

    Command Description Function Codes

    Weigh 31

    Cancel 32

    Send Status to host 33

    Monitor 34

    Weigh

    The Weigh command directs the scale to send a weightvalue to the host terminal to determine the price. Thecommand remains in effect until the scale has a stablenon-zero weight or it receives a Cancel command tostop the function.

    The recommended procedure is that the item be placedon the scale before the weigh command is sent. Thisshould reduce errors and speed the weighing process. Ifdesired, either the status or monitor command can beused to determine when a stable weight is available.

    When a weight request is sent, the scale responds in thefollowing format.

    31 31 3V 3W 3X 3Y 3Z

    Values for the five data bytes are presented in thefollowing table.

  • RS-232 CommandsScanner/Scale Commands

    Interface Programmers Guide 4-17

    Data Bytes Measure

    Pounds Kilograms (9.995kgs max)

    Kilograms(13.995 kgs max)

    3V Tens Unit Ones Unit Tens Unit

    3W Ones Unit Tenths Unit Ones Unit

    3X Tenths Unit Hundredths Unit Tenths Unit

    3Y HundredthsUnit

    Thousandths Unit Hundredths Unit

    3Z not present not present Thousandths Unit

    Cancel

    The Cancel command cancels the Weigh commandimmediately preceding it. The scanner acknowledgesthe message with the standard response code of 30. Theresponse message including the address byte would be31 30.

    Send Status to host

    With the address byte for the scale included, the scannersends the following response message after the SendStatus to host command.

    31 33 3V 3W 3X 3Y 3Z

  • RS-232 CommandsScanner/Scale Commands

    4-18 Interface Programmers Guide

    The five data bytes return the status of the scale.Possible responses for the data bytes are listed in thefollowing table.

    Data Bytes Response Description Codes

    3V Weight is presented in lbs 30

    Weight is presented in kgs 31

    3W Scale enabled 30

    Scale disabled 31

    3X Zero weight display after 5seconds

    31

    3Y Timers always disabled 32

    3Z Scale not ready 30

    Non-stable weight 31

    Stable weight over 30.0 lbs(9.995 kgs)

    32

    Stable zero weight 33

    Stable non-zero weightavailable

    34

    Stable weight above zerohas been sent

    35

  • RS-232 CommandsScanner/Scale Commands

    Interface Programmers Guide 4-19

    Scale Not Ready Status

    The Scale not ready status implies that the scale will notweigh an item because the scale needs to be reset tozero or needs calibration, or the scanner/scale isconfigured without a scale.

    Assuming the scale function is enabled, operators candepress the reset switch to zero the scale. If the scalestill is not ready, operators should clean debris aroundand under the weight plate and depress the reset switchagain.

    The unit will show on its display (integrated or remote)if it requires calibration. If the scale continues to send anot ready status, the scale may need calibration or to beserviced.

    Monitor

    The Monitor command directs the scale to output astable non-zero weight or the scale status if the scaledoes not have a stable non-zero weight. This commandis intended for use by a POS-driven remote scale weightdisplay (live weight). The stable weight returned is notintended for determining the price of an item. Theresponses that are possible from this command are thefollowing.

    31 34 34 3Y 3Y 3Y 3Y 3Y (3Y)

    OR

    31 34 3X

  • RS-232 CommandsScanner/Scale Commands

    4-20 Interface Programmers Guide

    The first response message contains the stable non-zeroweight. The scale responds with the second messagewhen a stable non-zero weight is not available. 3Xdenotes the current scale status, while 3Y represents thevalue for the weight.

    Possible status values are listed in the following table.

    Data BytesSent with weight valueResponse Description Codes

    3X Stable non-zero weight 34

    Data BytesSent without weight valueResponse Description Codes

    3X Scale not ready 30 H

    Scale unstable 31

    Scale over capacity 32

    Stable zero weight 33

    Scale under zero weight 35

    Your application program sends these commands fromthe terminal to control the display. The commandslisted in the following table must be preceded by anaddress byte of 32.

    Command Description Function Codes

    Display LCD data 31

    Send Status to host 33

    Scanner/ScaleDisplay Commands

  • RS-232 CommandsScanner/Scale Commands

    Interface Programmers Guide 4-21

    Display LCD data

    The Display LCD data command displays the 7 ASCIIcharacters that follow the 31. A period may be sent toshow the price and will not count as one of thecharacters. The command is acknowledged with a 32 30response.

    Send Status to host

    With the address byte for the display included, theresponse message for the Send Status to host commandis the following.

    32 33 3X

    The following table shows the possible values for 3X.

    Data Byte Response Description Codes

    3X LCD display shows weightor amount

    30

    LCD display shows weightonly

    31

    Alphanumeric display, notsupported

    not supported

    32

    The Special Function commands are the same as thecommands for NCR scanner-only models. Thedifference in using these commands is that you mustinclude an address byte of 33 in the message structure.Special Function commands are useful because theygive the scanner/scale programmer the samecommands as the scanner-only models. The

    Scanner/ScaleSpecial FunctionCommands

  • RS-232 CommandsScanner/Scale Commands

    4-22 Interface Programmers Guide

    scanner/scale does not acknowledge these commandsunless the ACK/NAK option has been activated. Youmust use parity and a terminator byte with these typesof messages.

    Note: For commands to the scanner in a scanner/scalemodel, you should use the scanner commands with anaddress of 30.

  • RS-232 CommandsModel Differences

    Interface Programmers Guide 4-23

    Model Differences

    With the variety of scanner products that NCRproduces, there are some commands that are availablewith some scanners and not available with others. Thissection discusses the commands that are available withcertain models and includes model-specific commands.

    With the exception of Start Scanner, Configuration andDevice Configuration Requests, all of the commandsdiscussed in this chapter are available to these three slotscanners.

    The 7870 utilizes bi-optic scanning technology byreading tags through two scan windows. This capabilityincreases the amount of successful reads on the firstpass.

    The 7880 scanner is a new generation vertically orhorizontally mounted unit. This model is also availableas a scanner/scale. The 7880 is available with optionalPACESETTER Plus and PACESETTER Plus III.

    The 7875 utilizes bi-optic scanning technology whileincluding significant areas of performanceimprovement. New features include the addition of top-side read, a larger bottom window, and greatlyenhanced presentation scanning to facilitate check-outcashiers by increasing their productivity with minimalrisk of occupational injury.

    7870, 7875 and 7880

  • RS-232 CommandsModel Differences

    4-24 Interface Programmers Guide

    PACESETTER Plus is a standard feature on the NCR7875. PACESETTER Plus III is an optional feature whichaugments PACESETTER Plus.

    The 7890 presentation scanner has the capability to useall scanner-only commands except for thePACESETTER Plus commands. This scanner modeldoes not offer a scale nor PACESETTER Plus like the7870, 7875 and 7880 scanner/scales. Read ROM versionnumber is available in 7890 scanners with versions offirmware 497-0301339 and higher. The 7890 is the onlyscanner model that uses the Start Scanner command.

    7890-0200 models also support the Configuration andDevice Configuration Request commands.

    7890-5800 models support the Program command.

    7890

  • Interface Programmers Guide 5-i

    Chapter 5

    OCIA with NCR Scanners

    Using OCIA 5-1

    OCIA Message Structures 5-2Messages in OCIA Long Format 5-2

    Command Message Format 5-3Tag Message Format 5-4

    Messages in OCIA Single Cable LongFormat 5-6

    Command Message Format 5-6Tag Message Format 5-7OCIA Single Cable Long Response

    Format 5-10PACESETTER PLUS Differences 5-11

    Using Label Identifiers with OCIA 5-12

    Interface Requirements and Recommendations 5-15Scanner Input Signals 5-17Scanner Output Signals 5-18

  • OCIA with NCR ScannersUsing OCIA

    Interface Programmers Guide 5-1

    Using OCIA

    Unlike RS-232, the OCIA formats are fixed formatprotocols. As a result, no options are available inparameter settings, and the terminal determines the rateof transmission. You do not have to set equalparameters or use the same message structure options(except with PACESETTER Plus data) between scannerand terminal because these options do not exist. Youdo, however, have to set up your application programso that the terminal and scanner communicate using anOCIA format.

    Note: The factory sets the Communications Protocol toa default setting. You should change the protocol if it isnot the one you are planning to use for yourcommunications.

    If you are more familiar with RS-232 communications,keep in mind that you need to send messages in anOCIA-supported format and use OCIA function codesto issue commands to the scanner.

    Your scanner verifies the terminal BCC. Likewise, yourapplication should verify the scanner BCC.

  • OCIA with NCR ScannersOCIA Message Structures

    5-2 Interface Programmers Guide

    OCIA Message Structures

    Note: All information shown in this section includesproper parity.

    The two OCIA formats covered by this programmer'sguide use different message structures for transmittingdata between scanner and terminal. This section ofChapter 5 describes the command message format andthen covers the tag message format for each version ofOCIA long format communications.

    Note: All characters are written in Hex format. AnyASCII characters have double quotation marks aroundthem.

    The command message format is the structure forsending OCIA command messages to the scanner.

    The tag message format is the structure that is used bythe scanner to send tag data to a host terminal throughthe communications link. This section clarifies thestructure of these messages so that you can set up anapplication program to expect tag data in this format.

    Note: Optional items in the message diagramsillustrated throughout this chapter are highlighted ingray shading like this:

  • OCIA with NCR ScannersOCIA Message Structures

    Interface Programmers Guide 5-3

    In addition, the BCC byte in your messages is notcalculated automatically. You must determine the BCCbased on the codes present in your messages.

    Each message in OCIA long format contains thefunction code for the command to be sent. Youconstruct single byte command messages by sendingonly the function code. To create multiple bytecommand messages, however, you must include thefunction code and a block check character (BCC). Tagmessages consist of a label identifier, tag data, and aBCC byte.

    Command Message Format

    Command messages utilize function codes to controlthe operation of the scanner. To construct messages inthis format, you only need to include the function codein single byte messages and the function code and BCCbyte in multiple byte messages as illustrated in Figure5-1.

    Single Byte Messages

    Function Code

    Multiple Byte Messages

    Function Code BCC Byte

    Messages in OCIALong Format

    Figure 5-1OCIA Long Format CommandMessage Structures

  • OCIA with NCR ScannersOCIA Message Structures

    5-4 Interface Programmers Guide

    In the Function Code portion of the message, include acommand from the OCIA long format list ofcommands. These commands direct the scanner toperform a function. Commands can be single ormultiple bytes and are issued only by the host terminal.

    The BCC Byte is a necessary component of the multiplebyte command message. This byte helps assure accuratedata during the transmission of a message. The BCC isthe exclusive or of all bytes sent, including the paritybit.

    Tag Message Format

    The scanner sends all data from the bar-coded labelsthat it reads to the host terminal in this format. Itconstructs the tag message in OCIA long by sending thetag label identifier, tag data, and any PACESETTERPlus data with a BCC byte to the host terminal. Figure5-2 provides a message map of the tag message format.

    Note: Your application program must be configured toaccept tag data in this format if you plan to use OCIAlong. Also, be aware that when the scanner is enabled,tag data can be sent to the terminal at any time.

    Label Identifier Tag Data PPD BCC Byte

    Note: Function codes are not included on tag messagessent to the host terminal.

    Figure 5-2OCIA Long Format Tag MessageStructure

  • OCIA with NCR ScannersOCIA Message Structures

    Interface Programmers Guide 5-5

    The Label Identifier field tells the terminal what type ofbar code the scanner has read. Label identifiers and thestructure for each type of tag data are discussed in thenext section.

    The Tag Data portion of the message transports datathat the scanner has read from a bar-coded label. Tagdata has various message structures that are dependenton what type of label the data comes from. Thestructure for tag data is given in the next section of thischapter.

    PPD stands for the PACESETTER Plus data field. Itconsists of PACESETTER Plus Mode 3 Trailer data.PACESETTER Plus data is optional in the tag datamessage; it can only be used with scanner models thatare equipped with PACESETTER Plus capability. ThePPD can be enabled and disabled by the EnablePACESETTER Plus Mode 3 Trailer and the DisablePACESETTER Plus Mode 3 Trailer commands that areissued from the terminal, or by programming thescanner. You can find all PACESETTER Plus commandsin Chapter 6, OCIA Commands.

    The PACESETTER Plus data field of the tag datamessage has a specific structure. The format forPACESETTER Plus data is the following.

    0C 0Y 0Z

    Note: Refer to Appendix B, PACESETTER Plus Datafor information regarding the interpretation ofPACESETTER Plus data contained in Y and Z.

  • OCIA with NCR ScannersOCIA Message Structures

    5-6 Interface Programmers Guide

    As with the entire tag message, your applicationprogram must expect PACESETTER Plus data in thisformat.

    The BCC Byte is a necessary component of the tagmessage. This byte helps assure accurate data duringthe transmission of a message. The BCC is the exclusiveor of all bytes sent, including the parity bit.

    Note: The memory buffer in the scanner holds onlytwo tags. After the buffer is filled, no additional tags areread if the data cannot be sent to the host terminal.

    The message structure for OCIA single cable longformat is similar to that of RS-232. OCIA single cablelong contains additional bytes that are not present inOCIA long format. The message has a set prefix byte of80 and terminates with a BCC byte. Each message inOCIA single cable long must have a minimum of 4bytes.

    Command Message Format

    Command messages utilize function codes to controlthe operation of the scanner. To construct messages inthis format, you need to include the componentsillustrated in Figure 5-3.

    80 Address Byte Function Code Data BCC Byte

    The 80 in the message is the set prefix byte for all OCIAsingle cable long communications. It is labeled as 80 inthe message structure because the prefix is always 80.

    Messages in OCIASingle Cable LongFormat

    Figure 5-3OCIA Single Cable Long FormatCommand Message Structure

  • OCIA with NCR ScannersOCIA Message Structures

    Interface Programmers Guide 5-7

    The Address Byte is a necessary structural componentthat determines the specific device within thescanner/scale that receives the message. The followingis a list of valid addresses

    Scanner (30)

    Scale (31)

    Display (32)

    Special Function Address (33)

    The Function Code portion of the message is where youinclude a command from the OCIA list of commandsfeatured in Chapter 6, OCIA Commands, in order to havethe scanner or scale perform some function. Commandscan be single or multiple bytes and are issued only bythe host terminal.

    Data bytes are not a required component of allmessages. The data bytes that are sent depend on thefunction code or command. Most commands do notinclude data.

    The BCC Byte is a necessary component of thecommand message. This byte helps maintain accuratedata during the transmission of a message. The BCC isthe exclusive or of all bytes sent, including the paritybit.

    Tag Message Format

    The scanner sends all data from the bar-coded labelsthat it reads to the host terminal in this format. It

  • OCIA with NCR ScannersOCIA Message Structures

    5-8 Interface Programmers Guide

    constructs the tag message in OCIA single cable long bysending data in the format illustrated in Figure 5-4.

    Note: Your application program must be configured toaccept tag data in this format if you plan to use OCIAsingle cable long. Also, be aware that when the scanneris enabled, tag data can be sent to the terminal at anytime.

    30 38 Label Identifier Tag Data PPD BCC Byte

    30 is the scanner address, and 38 is the function codethat indicates data follows. As with the commandmessage format for OCIA single cable longconfigurations, the tag message must include anaddress byte. Since the address is constant in thismessage format, the address byte never changes.

    The Label Identifier field tells the terminal what type ofbar code the scanner has read. Label identifiers and thestructure for each type of tag data are discussed in thenext section.

    The Tag Data portion of the message transports datathat the scanner has read from a bar-coded label. Tagdata has various message structures that are dependenton what type of label the data comes from. Thestructure for tag data is given in the next section of thischapter.

    PPD stands for the PACESETTER Plus data field. Itconsists of PACESETTER Plus Mode 3 Trailer dat