Metrologic Instruments Cubit MS6520 Series User Manual

Page 20

Advertising
background image

14

P

ROGRAMMING

M

ODES

(

CONTINUED

)

EXAMPLE #3: The following example shows the events that occur when an
invalid bar code is sent. This sample will load the factory default settings
and then set the baud rate to 19200.

HOST

SCANNER

FEATURE

COMMAND

ASCII REPRESENTATION

RESPONSE

Enter Program Mode [stx]999999[etx]

02h 39h 39h 39h 39h 39h 39h 03h

[ack] or 06h

Load Defaults

[stx]99999:[etx]

02h 39h 39h 39h 39h 39h 3Ah 03h

[nak] or 15h

Invalid command was sent, you must start over!

Enter Program Mode [stx]999999[etx]

02h 39h 39h 39h 39h 39h 39h 03h

[ack] or 06h

Load Defaults

[stx]999998[etx]

02h 39h 39h 39h 39h 39h 39h 03h

[ack] or 06h

19200 Baud Rate

[stx]415870[etx]

02h 34h 31h 35h 38h 37h 30h 03h

[ack] or 06h

Exit Program Mode

[stx]999999[etx]

02h 39h 39h 39h 39h 39h 39h 03h

[ack] or 06h

The scanner will emit a long beep!

This example illustrates 2 important points.

First, if an invalid command is sent from the host, the scanner responds with
a [nak] and the end-user must start over from the beginning.

Second, if a command is sent to change the Baud Rate, the new baud rate
does not take effect until after the end-user exits program mode.

ABREVIATED ASCII TABLE

Character

Hex Value

Decimal Value

[STX] 02h

2

[ETX]

03h

3

[ACK]

06h

6

[NAK]

15h

21

0

30h

48

1

31h

49

2

32h

50

3

33h

51

4

34h

52

5

35h

53

6

36h

54

7

37h

55

8

38h

56

9

39h

57

Advertising
This manual is related to the following products: