The text of a manual · part 7 of 18
Multi-Purpose Bar Code Workstation Series B (Catalog Number 2755-DH1) User Manual: 5 - Programming Via Escape Sequences, pages 44 to 52
Pages 44 to 52 of 132, from Multi-Purpose Bar Code Workstation Series B (Catalog Number 2755-DH1) User Manual
The original document is the PDF (1.2 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-DH1
Page 44
Chapter 5 Programming Via Escape Sequences
Code ID Character Assignment Esc – y <n> / <one character>
Code ID characters are single ASCII characters that can be added to the beginning of decoded bar code data. These characters indicate the symbology used to encode the data. All decoded bar code messages may have a single character which identifies the code symbology added to the beginning of each message. This character is configurable, and may be any single ASCII character. This code ID character may be suppressed or transmitted with the bar code message. The default ID Characters are shown in the table below. Code
Default ID Character
Code 39 Interleaved 2 of 5 UPC/EAN Codabar Code 128 Code 11 a b c d e f
Code ID Character Assignment Syntax Esc – y <n> I <ID character>
Values of n:
n
Symbology
1 2 3 4 5 6
Code 39 Interleaved 2 of 5 UPC/EAN Codabar Code 128 Code 11 0...6
<n> is the symbology <ID character>may be any character from the 128 character ASCII character set. The new code ID character will not be transmitted until code ID transmission is enabled. Note: This escape sequence cannot be concatenated.
Code ID Character Assignment Example If you wish to have the letter ”s” to be the code ID character for Code 128, send the following escape sequence to the decoder. Esc – y 5 I s
5–19
Page 45
Chapter 5 Programming Via Escape Sequences
Code ID Character Transmission The transmission or suppression of the code ID characters is configurable. Esc – y 1 Q
Note: The Q escape sequence controls many different configuration options. Make sure that all wanted options are included when the <n> number is calculated.
Code ID Character Transmission Syntax Esc – y <n> Q Function
Binary Value 0 1 2 16* Values of n:
All Functions Disabled Code ID Characters Transmitted No–Read Recognition On ROM/RAM Self Test Enabled
0, 1, 2, 3, 16, 17, 18, 19 * Default
The default value of <n> is 16. The ROM/RAM self test is enabled. No–read recognition is OFF and code ID characters are not transmitted.
Code ID Character Transmission Example To enable the transmission of the code ID characters, send the following escape sequence: Esc – y 1 Q
Since the binary values for the no–read recognition (2), and ROM/RAM self test (16) were not used in the construction of <n>, they will be disabled.
Serial Port Configuration Esc – y <n> P
“Serial Port” refers to the Display Terminal and Host Computer port communication parameters. The parameters of the serial port may be changed by escape sequences or configuration bar code symbols.
Baud Rate Parameters The baud rate, used for communications to the serial ports, is programmable. The available baud rates are:
5–20
• 600 • 1200 • 2400 • 4800 • 9600 • 19200
Page 46
Chapter 5 Programming Via Escape Sequences
Parity Selection The parity of the transmitted data may be configured as odd, even, 0’s (space) or 1’s (mark).
Data Bits Data bits are set to seven and are not configurable.
Stop Bits One or two stop bits may be transmitted at the end of each character.
Intercharacter Delay A delay time can be inserted between transmitted characters. If the intercharacter delay is disabled, then there will be no delay between characters. If the delay is enabled, then the delay period, configured independently, specifies the number of milliseconds that elapses between the completed transmission of one character and the beginning of transmission of the next. The default delay time is 20 ms. Delay time is set using the Intercharacter Delay Time escape sequence or by scanning configuration bar code symbols.
Serial Port Syntax Esc – y <n> P Binary Value
Function
2 3 4 5 6* 7
600 baud 1200 baud 2400 baud 4800 baud 9600 baud 19200 baud
0* 8
1 stop bit 2 stop bits
0* 16 32 48
0’s parity 1’s parity Even parity Odd parity
0* 64
Intercharacter delay off Intercharacter delay on
Values of n:
2 . . . 127 * Default ① Default Delay is 20 ms. Any other delay time must be using the Interchanger Character Delay Time escape sequence or the Dely = configuration bar code symbol.
The default value of <n> is 6, 9600 baud, 1 stop bit, 0’s parity, and the intercharacter delay disabled. 5–21
Page 47
Chapter 5 Programming Via Escape Sequences
Note: The new configuration of the Serial Port is effective immediately after receipt of the command. Your host must also be able to switch communication parameters to maintain communications. Note: Data bits are set to seven and are not configurable. If you have trouble communicating with the decoder, scan the Fixed Serial Port Configuration symbol Enable At Reset, then reset the decoder. The Enable At Reset symbol causes the serial port configuration to be set to the following values when the decoder is reset, or the power is cycled: Baud rate Parity Stop bits
9600 0 1
The configuration of intercharacter delay and RTS/CTS handshake is not effected by this option, they remain in their last configured values
Serial Port Configuration Example To select the following new configuration of 2400 baud, 2 stop bits, odd parity, intercharacter delay on (with the default 20 millisecond delay) <n> is constructed as follows: 2400 baud 4 2 stop bits 8 odd parity 48 delay on 64 Total 124
The escape sequence to send the decoder is Esc – y 124 P
Intercharacter Delay Time Esc – y <n> D
The delay time is set using the Intercharacter Delay Time escape sequence. Note: The intercharacter delay is enabled and disabled using the Serial Port Configuration escape sequence Esc – y <n> P.
Intercharacter Delay Time Syntax Esc – y <n> D Values of n:
2 . . . 127
The default intercharacter delay time is 20 ms.
Intercharacter Delay Time Example To change the intercharacter delay time to 10 ms, enter the following escape sequence: Esc – y 10 D 5–22
Page 48
Chapter 5 Programming Via Escape Sequences
XON/XOFF Pacing Esc – y <n> X
The decoder has the capability to have the flow of the data transmitted to the host computer paced by an XON/XOFF protocol. Whenever this pacing protocol is enabled, the decoder will stop transmission of data to the host whenever it receives an XOFF character. Transmission will resume after reception of an XON character. When pacing is disabled, the decoder will ignore these characters.
XON/XOFF Pacing Syntax Esc – y <n> X n
Function
0* 1
Disable XON/XOFF Pacing Enable XON/XOFF Pacing
Values of n:
0, 1 * Default
The default value of <n> is 0, pacing disabled.
XON/XOFF Example 1 Enable XON/XOFF pacing by sending Esc – y 1 X
XON/XOFF Example 2 Disable XON/XOFF pacing by sending Esc – y 0 X
Single Read Mode Esc – y <n> J
The decoder supports a single read mode that allows the host computer to cue the decoder for a single decode.
Single Read Mode Operation Single read mode places the decoder into a mode whereby a single bar code symbol may be read only after an Enable Next Read command has been received by the decoder. This allows the software in the host computer to control when bar code data is entered into the system. When Single Read Mode is enabled, bar code symbols will not be decoded until the Enable Next Read (Esc – y 1 K) escape sequence is sent from the host to the decoder.
Single Read Mode Syntax Esc – y <n> J n
Function
0* 1
Single Read Mode Disabled Single Read Mode Enabled
Values of n: 0, 1 * Default The default value of <n> is 0, Single Read Mode Disabled. 5–23
Page 49
Chapter 5 Programming Via Escape Sequences
Single Read Mode Example 1 To place the decoder into single read mode, send the following escape sequence to the decoder: ESC – y 1 J
To allow the data from one decode to be passed to the host, send the following Enable Next Read escape sequence: Esc – y 1 K
Single Read Mode Example 2 To cause the decoder to exit single read mode send the following escape sequence: ESC – y 0 J
Enable Next Read Esc – y 1 K
With the decoder in single read mode, the Enable Next Read escape sequence must be sent, from the host, before a symbol will be decoded.
Enable Next Read Syntax Esc – y <1> K n
Function
1
Enable next read
There is no default value for <n>. Note: If no–read recognition is enabled and an Enable Next Read command is sent, but the label cannot be read, the no–read message will be sent.
Enable Next Read Example When the escape sequence Esc – y 1 K is sent to the decoder, it allows the decoder to decode the next bar code symbol. After one bar code symbol has been decoded and before another bar code symbol may be read, another Esc – y 1 K will have to be sent to the decoder.
Header Esc – y <n> N <characters> 5–24
The header is a group of characters that are transmitted before the bar code data. The number of characters can vary from zero to ten. Refer to page 7–1 for the placement of the header.
Page 50
Chapter 5 Programming Via Escape Sequences
Header Syntax Esc – y <n> N <characters> Values of n:
0 . . . 10
The default for the header is 0 (empty). The <n> value in the escape sequence tells the decoder how many characters after the N to load into the header buffer. <characters> can be any valid ASCII character. Note: This escape sequence cannot be concatenated.
Header Example If you name a header Wand#3, <n> is equal to six because Wand#3 is 6 characters long. The escape sequence that should be transmitted to the decoder is: Esc – y 6 N Wand#3
Note: Spaces are added to the manual for clarity. Do not include spaces in the actual escape sequence. If spaces are wanted in the header, make sure that they are counted when <n> is determined.
Trailer Esc – y <n> 0 <characters>
The trailer contains characters that are transmitted after:
• The bar code data • The no–read message The number of characters can vary from zero to ten. Refer to page 7–1 for the placement of the trailer.
Trailer Syntax Esc – y <n> O <Characters> Values of n:
0 . . . 10
The default trailer is CR LF which is shown on the Configuration Display Screen as ^M ^J. The <n> value in the escape sequence tells the decoder how many ASCII characters after the O to load into the trailer buffer. <characters> can be any valid ASCII characters. 5–25
Page 51
Chapter 5 Programming Via Escape Sequences
Note: This escape sequence cannot be concatenated.
Trailer Example If you want a trailer to consist of CR LF ET, <n> is equal to three. The escape sequence transmitted to the decoder is: Esc – y 3 O CR LF ET
Note: Spaces are added to the manual for clarity. Do not include spaces in the actual escape sequence. If the spaces are wanted in the trailer, make sure that they are counted when <n> is determined.
No-Read Recognition Esc – y 2 Q
The decoder can be configured to recognize a no–read condition. A no–read occurs when a scan is completed but the bar code is not decoded. When no–read recognition is enabled, and a no–read occurs, the decoder will output the contents of the no–read message buffer and pulse the Valid Read LED and speaker twice.
No-Read Recognition Syntax Esc – y <n> Q Binary Value
Function
0 1 2 16*
All Functions Disabled Code ID Characters Transmitted No–Read Recognition Enabled ROM/RAM Self Test Enabled
Values of n:
0, 1, 2, 3, 16, 17, 18, 19 * Default
The default value of <n> is 16. The ROM/RAM self test is enabled. The code ID character transmission and no–read recognition is disabled. Note: This command allows several functions to be selected simultaneously. To determine <n> choose the wanted functions and add up the corresponding binary values. Note: If a unique reader address has been programmed into the decoder and a no–read occurs, the reader address and no–read messages will be transmitted to the Host and/or Display Terminal port.
No-Read Recognition Example 1 To enable no–read recognition, send the following escape sequence: Esc – y 2 Q 5–26
Page 52
Chapter 5 Programming Via Escape Sequences
No-Read Recognition Example 2 To enable no–read recognition and ROM/RAM self test, send the following escape sequence: Esc – y 18 Q
No-Read Message Esc – y <n> y <characters>
The contents of the no–read message buffer is transmitted whenever no–read recognition is enabled and a bar code was scanned, but not decoded. The number of characters in the buffer may vary between zero (empty buffer) and ten.
No-Read Recognition Syntax Esc – y <n> Y <characters> Values of n:
0 . . . 10
The default no–read message is 0 (empty). The <n> value in the above escape sequence tells the decoder how many characters after the Y to load into the no–read message buffer. Note: This escape sequence cannot be concatenated.
No-Read Message Example If you want a no–read message of Try Again, <n> is equal to nine (the space is counted as a character). The escape sequence transmitted to the decoder is: Esc – y 9 Y Try Again
If n=0, no characters will be transmitted. Note: Spaces are added to the manual for clarity. Do not include spaces in the actual escape sequence. If spaces are wanted in the no–read message, make sure that they are counted when <n> is determined. In the above example, the space between Try and Again was counted.
Reader Address Esc – y <n> A
The reader address is a unique, one character address that you assign to your decoder. The address can be any one of 128 ASCII characters. Refer to page 7–1 for the placement of the reader address.
5–27