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 42

DS/DD Series B Enhanced Bar Code Decoders User Manual (Bulletin 2755): 15 - ASCII Host Commands, pages 189 to 198

Pages 189 to 198 of 361, from DS/DD Series B Enhanced Bar Code Decoders User Manual (Bulletin 2755)

The original document is the PDF (1.4 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 Allen-Bradley 2755-DD and Allen-Bradley 2755-DS

Page 189

Chapter

15

ASCII Host Commands Chapter Objectives

This chapter defines ASCII commands you can send from a host to the decoder using the RS-232, RS-422, or DH485 communication interfaces.

Using RS-232/RS-422

The RS-232, RS-422, and DH485 interfaces allow you to send single or two character ASCII commands from the host to the decoder. All commands and command responses are ASCII character strings. The single character commands control scanning (Start/Stop Scan characters), and the transmission (ACK/NAK characters) of data to the host. They are not used to configure or monitor decoder operations. The single character commands are configured on the Host Communications screen described elsewhere in this manual. The two character commands perform the same functions as the settings on the configuration screens, and can be used to configure and monitor decoder operations. The rest of this chapter defines the two character ASCII commands.

! Using DH485

ATTENTION: When controlling discrete outputs locally using AUX port configuration, suspend host communications to prevent outputs from unintentionally changing state.

The DH485 interface supports the two character ASCII commands. To use these commands, the decoder requires you to set the Host Protocol parameter on the Host Communications screen to one of the following: • DH485 ASCII-1 Protocol with Responses • DH485 ASCII-2 Protocol without Responses Note: The DH485 ASCII-2 Protocol (without responses) reduces data traffic on the link. Responses are unnecessary since the link layer of the Allen-Bradley DH485 network insures that a command is properly received. The decoder supports the following DH485 communication addresses: DH485 LSAP 0 1 or 128 129

Function Diagnostic Commands (Perform Application Layer) ASCII Commands (Perform Application Layer) Perform Link Reset-immediate Block

Publication 2755-833

Page 190

15–2

ASCII Host Commands

Table 15.A Two–character ASCII commands (grouped by function) Page Number

Command Code

Command Function

Symbologies 15–8

CT

Configure Bar Code Symbology and Supplements

15–9

SL

Configure Bar Code Specific Length

15–11

CC

Configure Code 39, I 2-of-5, Codabar Check Characters

15–12

CG

Configure I 2-of-5 Guard Bar

15–13

CQ

Configure Quiet Zone

15–14

CF

Configure Code 128 FNC1 Character

15–15

CV

Configure Code Verification List

15–16

CP

Configure Pharma–Code

Scanner Control 15–18

SC

Configure Scanner A Control

15–20

PB

Configure Scanner B Control

15–21

IF

Configure Scanner A Package Detect Filter and Sense

15–22

BF

Configure Scanner B Package Detect Filter and Sense

15–23

BL

Configure Scanner B Laser Mode

Primary Match Code Table 15–24

SW

Write Scanner Source to Match Code Table

15–25

AB

Auto-load Begin

15–25

AE

Auto-load End

15–26

AL

Auto-load

15–28

OS

Set Output Normally Open/Normally Closed

15–29

OC

Set Output Condition and Duration

15–31

OH

Hold Output Open/Closed

15–33

MR

Read Primary Match Code Table Entry (1-8)

15–34

MW

Write Primary Match Code Table Entry (1-8)

15–35

CM

Clear Primary Counter (1-8)

15–36

CO

Clear All Primary Output Counters

Extended Match Code Table

Publication 2755-833

15–25

AB

Auto-load Begin

15–25

AE

Auto-load End

15–26

AL

Auto-load

15–36

CA

Clear Extended Match Counters

15–37

SE

Set Extended Match Counter

15–38

RC

Read Extended Match Counter

15–39

SM

Set Extended Match Data

15–41

RP

Read Extended Match Data

15–43

RA

Read All Extended Counters

15–45

CS

Disable Extended Match Code Set

15–46

RS

Read Extended Match Set Status

Page 191

ASCII Host Commands

Page Number

Command Code

15–3

Command Function

AUX and LCD Display Format 15–47

DF

Enable AUX Terminal and LCD to Display Formatted Data

15–48

DP

Configure Data Display Positions for AUX Terminal and LCD

15–49

SD

Enable LCD Scrolling

Host Message Replacement Rules 15–50

SR

Set Search and Replace Rule for Host Message Fields

15–52

SF

Set No-Read Replacement String

Host Communications & Host Message Format 15–53

HC

Configure Host Communications

15–55

HB

Configure Scanner B Start & Stop Characters

15–56

MF

Configure Host Message Format

15–58

HF

Set the Number of Fields in Host Message

15–59

IX

Configure AUX Terminal Source Identifier

15–60

IM

Configure Scanner A Source Identifier

15–61

IB

Configure Scanner B Source Identifier

15–62

HM

Configure Header Message

15–63

NM

Configure Default No-Read String

AUX Terminal Data Entry 15–64

AX

Configure AUX Terminal Data Entry Operations

15–66

TM

Display Text Message at AUX Terminal and LCD

15–68

PM

Configure Default Prompt Message for AUX Terminal and LCD

Status & Counters 15–69

PI

Read Decoder Performance Indicators

15–70

PR

Read Package Counter

15–71

NR

Read the Symbols Not Read Counter

15–72

MC

Read Output Counter

15–73

PC

Clear Package Counter

15–73

NC

Clear Symbols Not Read Counter

15–35

CM

Clear Primary Counters (1–8)

15–36

CO

Clear All Primary Output Counters

System Commands 15–74

RN

Save Configuration to Storage Memory and Restart

15–74

SA

Save Configuration to Storage Memory (No Restart)

15–75

DD

Set Configuration to Factory Defaults

15–75

RD

Set Configuration to Defaults, Save and Restart

15–76

RE

Restart

15–76

ID

Version of Software

Obsolete Commands (For Reference) 15–77

DM

Configure Bar Code Data Mask

15–77

PD

Configure Data Pad Character

Publication 2755-833

Page 192

15–4

ASCII Host Commands

Table 15.B lists the two character ASCII commands in alphabetical order, by command code. Table 15.B Two–character host commands (Alphabetical Order)

Publication 2755-833

Page Number 15–25

Command Code AB

Auto-load Begin

15–25

AE

Auto-load End

15–26

AL

Auto-load

15–64

AX

Configure AUX Terminal Data Entry Operations

15–22

BF

Configure Scanner B Package Detect Filter and Sense

15–23

BL

Configure Scanner B Laser Mode

15–36

CA

Clear Extended Match Count

15–11

CC

Configure Code 39, I 2-of-5, Codabar Check Characters

15–14

CF

Configure Code 128 FNC1 Character

15–12

CG

Configure I 2-of-5 Guard Bar

15–35

CM

Clear Counter (1-8)

15–36

CO

Clear All Primary Output Counts

15–16

CP

Configure Pharma–Code

15–13

CQ

Configure Quiet Zone

Command Function

15–45

CS

Disable Extended Match Code Set

15–8

CT

Configure Bar Code Symbology and Supplements

15–15

CV

Configure Code Verification List

15–75

DD

Set Configuration to Factory Defaults

15–47

DF

Enable AUX Terminal and LCD to Display Formatted Data

15–77

DM

Configure Bar Code Data Mask

15–48

DP

Configure Data Display Positions for AUX Terminal and LCD

15–55

HB

Configure Scanner B Start & Stop Characters

15–53

HC

Configure Host Communications

15–58

HF

Set the Number of Fields in Host Message

15–62

HM

Configure Header Message

15–61

IB

Configure Scanner B Source Identifier

15–76

ID

Version of Software

15–21

IF

Configure Scanner A Package Detect Filter and Sense

15–60

IM

Configure Scanner A Source Identifier

15–59

IX

Configure AUX Terminal Source Identifier

15–72

MC

Read Output Counter

15–56

MF

Configure Host Message Format

15–33

MR

Read Match Code Table Entry (1-8)

15–34

MW

Write Match Code Table Entry (1-8)

15–73

NC

Clear Symbols Not Read Counter

15–63

NM

Configure Default No-Read String

15–71

NR

Read the Symbols Not Read Counter

15–29

OC

Set Output Condition and Duration

15–31

OH

Hold Output Open/Closed

15–28

OS

Set Output Normally Open/Normally Closed

15–20

PB

Configure Scanner B Control

15–73

PC

Clear Package Counter

Page 193

ASCII Host Commands

15–5

Page Number 15–77

Command Code PD

Configure Pad Data Character (Obsolete Command)

15–69

PI

Read Decoder Performance Indicators

15–68

PM

Configure Default Prompt Message for AUX Terminal and LCD

15–70

PR

Read Package Counter

15–43

RA

Read All Extended Counts

15–38

RC

Read Extended Match Count

15–75

RD

Set Configuration to Defaults, Save and Restart

15–76

RE

Restart

15–74

RN

Save Configuration to Storage Memory and Restart

15–41

RP

Read Extended Match Data

15–46

RS

Read Extended Match Set Status

15–74

SA

Save Configuration to Storage Memory (No Restart)

15–18

SC

Configure Scanner A Control

15–49

SD

Enable LCD Scrolling

15–37

SE

Set Extended Match Count

Command Function

15–52

SF

Set Default Search Strings

15–9

SL

Configure Bar Code Specific Length

15–39

SM

Set Extended Match Data

15–50

SR

Set Search and Replace Rule for Host Message Fields

15–24

SW

Write Scanner Source to Match Code Table

15–66

TM

Display Text Message at AUX Terminal and LCD

Command Format The format or structure of the two character commands is: 1 Start Command Sequence

2 Command Code

3 Parameters

4 Terminator

1. Start Command Sequence. Contains the escape sequence <ESC>=!. The table below defines the ASCII and Hexadecimal equivalents of each character of the command sequence

ASCII and Hexadecimal Equivalents - Start Command Sequence Character ESC = !

ASCII 27 61 33

Hex 1B 3D 21

Publication 2755-833

Page 194

15–6

ASCII Host Commands

Note: The start command sequence is optional. The <ESC>=! sequence differentiates two character commands from single character commands. If any of the characters below are used as single character commands (ACK/NAK or Start/Stop Scan Characters), then the escape sequence (ESC=!) must be used with all two character commands that start with that character. ABCDHIMNOPRST If the single character commands do not use these uppercase characters, you do not have to use the start command sequence. For example, if N is used as the NAK command, then it would be impossible to send the NR command without preceding it with the ESC=! start command sequence. If n is used instead, then no start command sequence would be necessary to send an NR command. Therefore, we recommend using only lowercase letters for single character commands. Note: The start command sequence <ESC>=! is not valid when sending ASCII commands using the DH485 interface. 2. Command Code. Two characters that specify the command. 3. Parameters. Data that further determines the command action. Some commands do not have parameters. 4. Terminator. An ASCII control code (less than decimal 32) that terminates the command. Typical control codes are: <CR>, <LF>, <CRLF>, <ETX>.

Command Replies The decoder sends a reply in response to each command sent from the host. Command replies have the following structure:

1 Parameter

2 End of Parameter Code

3 =

4 Response Code

5 End of Message Code

Note: The first two parts of the response may not be present depending on the command.

Publication 2755-833

Page 195

ASCII Host Commands

15–7

1. Parameters. Contains data requested by the command parameters. Some commands do not return any parameters. 2. End of Parameter Code. Delimiter that indicates the end of the parameter list. This code is the same as the End of Message Code. 3. = Response delimiter. 4. Response Code. Indicates the status of the processed command. The table below lists the response codes and what they mean. Response Codes and Descriptions Response 00 01 02 11 50 97 98

Description Command complete (normal termination). Valid and successful command. Applies only to TM command. Display buffer is full. Applies only to TM command. Valid command but format is invalid. Unknown command. Reset to new configuration received. Reset to default configuration received.

5. End of Message Code. Indicates the end of the message. Typical end of message control codes are CR, CRLF, LF, ETX, or None. All examples in this chapter use <end> to represent the end of message control code. The End Message configuration parameter defines the end of message control code. Refer to the Host Message Format screen described elsewhere in this manual for additional details.

Publication 2755-833

Page 196

15–8

ASCII Host Commands

CT - Configure Bar Code Symbology and Supplements Command Format: CTfccs Function:

Enables or disables the decoding of a specific bar code symbology and supplements.

Parameters:

fccs

Command Parameter

Parameter Function f

Enable a bar code symbology?

Valid Values

1=Yes 0=No 01=Code 39 02=Interleaved 2-of-5 03=Codabar Specifies a bar code 04=UPC-A symbology.① 05=UPC-E 06=EAN-8 07=EAN-13 08=Code 128 0=None 1=2 character supplement Specifies supple2=5 character supplement ments for a bar code 3=2 or 5 character supplement symbology. ➁ 4= Auto (None, 2 or 5 character supplement)

cc s

① See the CP command for Pharma-Code configuration. ➁ Supplements are valid for UPC–A, UPC–E, EAN–8, EAN 13. For other symbologies, select 0=None or omit the “s” parameter.

= rr <end>

Response:

rr = response code <end> = end of message control code Example: Command:

CT1041

Parameters:

1041

Command Parameter f

Enable bar code symbology?

1= Yes cc

Select bar code symbology.

04= UPC-A s

Enable supplements for selected symbology.

1= 2 character supplement.

Parameter Functions

Values

00 = command complete response code CR = -

Publication 2755-833

Page 197

ASCII Host Commands

15–9

SL - Configure Specific Length for Bar Code Symbology Command Format: SLccssttuuvvwwxxyyzz Function:

Configures specific lengths for Code 39, Interleaved 2-of-5, Codabar, and Code 128 symbologies.

Parameters:

ccssttuuvvwwxxyyzz

Command Parameter

Parameter Function

Valid Values cc

Bar code symbology

01= Code 39 02= Interleaved 2-of-5 03= Codabar 08= Code 128 ss

1st specific length

00 through 64 ① tt

2nd specific length

00 through 64 ① uu

3rd specific length

00 through 64 ① vv

4th specific length

00 through 64 ① ww

5th specific length

00 through 64 ① xx

6th specific length

00 through 64 ① yy

7th specific length

00 through 64 ① zz

8th specific length

00 through 64 ①

① A value of 00 in the leftmost field indicates a variable length up to 64. A nonzero value in the left of each field indicates a specific length. The specific length for Interleaved 2-of-5 must be an even number. A two character Interleaved 2-of-5 symbol requires a length of 2.

Response:

= rr <end> rr = response code <end>= end of message control code for Carriage Return.

Publication 2755-833

Page 198

15–10

ASCII Host Commands

SL - Configure Specific Length for Bar Code Symbology (continued) Example: Command:

SL021416000000000000

Parameters:

021416000000000000

Command Parameter cc

Parameter Function Bar code type

02= Interleaved 2-of-5 ss

1st specific length

14① tt

2nd specific length

16① uu

3rd specific length

00① vv

4th specific length

00① ww

5th specific length

00① xx

6th specific length

00① yy

7th specific length

00① zz

8th specific length

00①

Values

① Only Interleaved 2-of-5 symbols with 14 and 16 characters will be decoded.

Response:

= 00CRLF 00 = command complete response code CRLF = end of message control code for Carriage Return and Line Feed.

Publication 2755-833