The text of a manual · part 31 of 42
DS/DD Series B Enhanced Bar Code Decoders User Manual (Bulletin 2755): 16 - PCCC Host Commands, pages 275 to 282
Pages 275 to 282 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 275
16–10
PCCC Host Commands
Execute Decoder Function High Byte Low Byte
MSB
LSB STS= 00H
1
CMD= 08H
0
3
TNS
2
5
Command Address = 600H through 639H,640H, 641H
4
Reply High Byte
Low Byte
MSB
LSB
1
STS= 00H
0
CMD Reply = 48H
3
2
TNS
If you send a command with an invalid address, the reply returns a status code of 10H (invalid address). To set the current configuration to the factory defaults, send this command: Set Decoder Configuration to Defaults High Byte
Low Byte
MSB 1
LSB CMD= 08H
STS= 00H
3
0 2
TNS Command Address = 633H
5
4
To save the current configuration and restart the decoder, send this command: Save Configuration and Restart Decoder High Byte
Low Byte
MSB 1
LSB STS= 00H
0
CMD= 08H
3
2
TNS
5
4
Command Address = 632H
To clear output counter 4 to all zeros, send this command: Clear Output Counter 4 High Byte
Low Byte
MSB 1
Publication 2755-833
LSB STS= 00H
CMD= 08H
0
3
TNS
2
5
Command Address = 610H
4
Page 276
PCCC Host Commands
16–11
Send Repeat Read Command The Repeat Read command tells the decoder to wait for bar code data. When data is available, the decoder sends it to a specific address in host memory using the unprotected write (08H) command. The host does not have to request data at each poll when a 2760-RB is used (RB polls automatically). The decoder automatically sends bar code data as it is decoded. The command structure for sending a repeat read command is: Repeat Read Command High Byte
Low Byte
MSB 1
LSB STS= 00
CMD= 08H
3
0
TNS
2
5
Command Address= 640H
4
7
Starting Target Host Address
6
9
Repeat Count= n
Size = n
8
• Command Address Bytes 4 and 5 contain address 640H. This address tells the decoder to perform a repeat read command. • Target Host Address Specifies the host address to which the decoder will send the read reply data. • Size Byte 8 specifies the maximum number of bytes sent to the host in each read reply. The maximum size is 122 bytes. • Repeat Count Byte 9 specifies the maximum number of bar code packets that can be sent to the host. A value of 0 means the decoder can send packets until terminated by a “Cancel Repeat Read” command.. After the host sends the repeat read command, the decoder generates an unprotected write command to send the bar code data to the host. The decoder continues to send data to the host until the repeat count is reached or until a Cancel Repeat command is sent to the decoder. The amount of data returned in the read reply is determined by the size parameter and the amount of data in the host buffer. If the repeat count is non zero, the repeat count automatically decrements by one and the repeat read command continues processing. When the repeat count decrements to zero, the repeat read command terminates.
Publication 2755-833
Page 277
16–12
PCCC Host Commands
Cancel Repeat Read Command To terminate the processing of a Repeat Read command, send the Cancel Repeat Read command to the decoder. Cancel Repeat Read Command High Byte
Low Byte
MSB 1
LSB STS= 00H
CMD= 08H
0
3
TNS
2
5
Cancel Repeat Read Command Address = 641H
4
Display Text Message on AUX Terminal / Enable AUX Terminal Keyboard.A To configure a message for display on the AUX terminal (and/or LCD Display), use the command address 900H or 901H. The 900H command address configures a message for display at the AUX terminal but does not enable the keyboard. The 901H command configures a message for display and enables the keyboard for one entry. Display Message on AUX Terminal (900H) Display Message and Enable Keyboard Entry (901H) High Byte
Low Byte
MSB 1
LSB STS= 00H
CMD= 08H
0
3
TNS
2
5
Command Address = 900H, 901H
4 6
7
Length of message string Message Data to AUX Port
If the message exceeds the size of the AUX terminal display, it will be truncated. If the LCD is enabled to display data and scrolling is disabled, data that exceeds 40 characters is truncated. If scrolling is enabled for the LCD, data that exceeds 20 characters is truncated. If you do not enter message data, the Default Prompt Message (defined during AUX terminal configuration) is used. Below is the reply to both the 900H and 901H command:
Publication 2755-833
Page 278
PCCC Host Commands
16–13
Command Replies High Byte 1
Low Byte
MSB STS= 00H
LSB CMD Reply = 48H
3
0 2
TNS
If the AUX port is not set to manual data entry mode (CONFIG jumper is open), the LCD will display the message but not the AUX terminal. The command returns a status of 01H. If the decoder has not processed the previous text message, the command returns a status of 02H indicating the command failed because the display buffer was not available.
Hold Discrete Output Open or Closed Allows the host to control the discrete outputs (regardless of their ”normal” state) for a set duration. When the specified duration expires, the output reverts to its previous state. If a normally open (or closed) output is held open (or closed), the state of the output will not change due to other conditions. Holds Discrete Output Open or Closed High Byte Low Byte MSB 1 STS= 00H CMD= 08H 3 TNS 5
Command Address = (see Appendix A)
7
Pulse Duration (in milliseconds)
LSB 0 2 4 6
Command Reply High Byte
Low Byte
MSB 1 3
LSB STS= 00H
CMD Reply = 48H TNS
0 2
Appendix A lists the command addresses for holding a discrete output (1-8) open or closed. Valid duration values (in milliseconds) are 0010 through 9999. Note that the duration must be expressed in hex format (0A through 270F hexadecimal).
Publication 2755-833
Page 279
16–14
PCCC Host Commands
Example (holds output closed for 10 milliseconds) High Byte Low Byte MSB 1 00H 08H 3 TNS 5
06H
60H
7
00H
0AH
LSB 0 2 4 6
Important: A duration of 0000 holds the specified output in the programmed state until it is changed with another host command or via the AUX terminal configuration screens. The condition field on the AUX terminal will display Open or Closed.
Diagnostic Link Commands
The diagnostic commands (06H) allow you to obtain diagnostic data on an DH485 communications link. The decoder supports these diagnostic commands: • Diagnostic Loop (CMD= 06H, FNC= 00H) • Read Diagnostic Counters (CMD= 06H, FNC= 01H) • Read Diagnostic Status (CMD= 06H, FNC= 03H) • Reset Diagnostic Counters (CMD= 06H, FNC= 07H) The command code for all diagnostic functions is 06H. A function code (FNC) identifies each command and specifies which command to perform.
Diagnostic Loop The Diagnostic Loop Command (CMD= 08H, FNC= 00H) echoes data back to the host. The reply returns the same data sent in the Diagnostic Loop Data area of the command. The data area can contain up to 122 bytes.
Publication 2755-833
Page 280
PCCC Host Commands
16–15
Diagnostic Loop Command High Byte
Low Byte
MSB
LSB STS= 00H
1
0
CMD= 06H
2
TNS
3
4
FNC=00H
5
Diagnostic Loop Data 122 bytes maximum Diagnostic Loop Reply High Byte
Low Byte
MSB 1
LSB STS= 00H
0
CMD Reply = 46H
3
2
TNS
5
4 Diagnostic Loop Data (same data as in command)
Read Diagnostic Counters The Read Diagnostic Counters command (CMD= 06H, FNC= 01H) returns diagnostic counter values. The command structure looks like this: Read Diagnostic Counters Command High Byte
Low Byte
MSB
LSB STS= 00H
1 3
0
CMD= 06H
2
TNS
4
FNC=01H
The reply returns values for ten diagnostic counters. The reply format looks like this: Read Diagnostic Counters Reply High Byte
Low Byte
MSB 1 3 5 7
LSB STS= 00H
0
CMD Reply = 46H
2
TNS Total Message Packets Received (2 bytes) Total Message Packets Transmitted (2 bytes)
9
Msg Retry Failures
11
4 6
Msg ACK-Timeout/Retries
8
Msg Recvd: NAK-NoMemory
Msg Replies: NAK-NoMemory
10
13
Msg Replies: NAK-NoService
Bad Messages Received
15
Msg Replies: NAK-TooBig
Msg Replies: NAK-Solicit
12 14
Publication 2755-833
Page 281
16–16
PCCC Host Commands
Each diagnostic counter increments when the event occurs. The Reset Diagnostic Counters command resets all counter values to zero (0).
Reset Diagnostic Counters The Reset Diagnostic Counters (CMD= 06H, FNC= 07) sets all diagnostic counter values to zero (0). The command and reply formats look like this: Reset Diagnostic Counters Command High Byte
Low Byte
MSB
LSB CMD= 06H
STS= 00H
1
0 2
TNS
3
4
FNC=07H Reset Diagnostic Counters Reply High Byte
Low Byte
MSB 1
LSB CMD Reply = 46H
STS= 00H
3
0 2
TNS
Read Diagnostic Status The Read Diagnostic Status command (CMD= 06H, FNC= 03H) returns seven diagnostic parameters in the reply: Diagnostic Return Parameters Parameter Mode/Status Extended Type Interface Type Processor Type Series/Revision Bulletin Number/Product Name Product Information
Value 00 EEH 22H 21H 22H (Series B, Revision C) ASCII characters unused
Bytes Size 1 byte 1 byte 1 byte 1 byte 1 byte 11 bytes 8 bytes
The command and reply format for the Read Diagnostic Status Command is:
Publication 2755-833
Page 282
PCCC Host Commands
16–17
Read Diagnostic Status Command High Byte
Low Byte
MSB
LSB STS= 00H
1
CMD= 06H TNS
3
0 2
FNC=03H
4
Read Diagnostic Status Reply High Byte
Low Byte
MSB 1
LSB STS= 00H
3
CMD Reply = 46H
0 2
TNS
5
EE
00
4
7 9
21
22
”2”
22
6 8
11
”5”
”7”
13
”–”
”5”
15 17 19
”D” (or “S”)
”D”
””
”1”
””
””
21 23
00
00
00
00
00
00
00
00
25 27
10 12 14 16 18 20 22 24 26
The Series/Revision byte indicates the product series and revision levels. The three most significant bits indicate the series and the other five bits indicate the revision. For example, a value of 0 = A, 1 = B, 2 = C. A
A
000
00000
B
C
Series A, Revision A returns as
Series B, Revision C returns as
001 00010
Publication 2755-833