The text of a manual · part 10 of 41
AdaptaScan Bar Code Readers (Cat. Nos. 2755-SN3, -SN5, and -SN8) Application Guide: 4 - Downloading Match Codes via DH485 Protocol with an SLC 5/03 or SLC 5/04 Controller, pages 75 to 82
Pages 75 to 82 of 354, from AdaptaScan Bar Code Readers (Cat. Nos. 2755-SN3, -SN5, and -SN8) Application Guide
The original document is the PDF (3.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 Accu-Sort 2755-SN3, Accu-Sort 2755-SN5, Allen-Bradley 2755-SN5, Accu-Sort 2755-SN8 and Allen-Bradley 2755-SN8
Page 75
Downloading Match Codes via DH485 Protocol with an SLC or SLC Controller
4–19
Response Codes Response codes have the following format: Byte
Contents
0 1 2 3
Mac ID (Address) 94 = Error Response x = General Error Code x = Additional Code
General Error Codes Code (hex) 02 08 09 0B 0C 0E 0F 10 11 13 14 15 16 18 19 D0-FF
Name Resource unavailable Service not supported Invalid attribute value Already in requested mode/state Object cannot perform service in its current mode/state Attribute not settable Access permission does not allow service Device’s mode/state does not allow object to perform service Reply data too large Not enough data Attribute not supported Too much data Object does not exist No stored attribute data Store operation failure Class specific
Publication 2755-6.8
Page 76
4–20
Downloading Match Codes via DH485 Protocol with an SLC or SLC Controller
Configuring the SLC Controller
This section describes how to configure the SLC 5/04, which is different than the 5/03. • Using APS and an RS-232 connection, establish an online connection the Channel 0 port of the SLC 5/04. • When online, change to DH485 protocol and do a WHO ACTIVE to view the nodes on the network. For complete details on configuring the SLC 5/04 or 5/03 processors, refer to the Advanced Programming Software manuals.
SLC 5/04 Configuration 1. Establish communication with the Channel 0 port of the SLC 5/04 using the 1747-CP3/A RS-232 cable. Default On line configuration DF1 Full–Duplex No Handshaking F7 1200 CRC Error Check Duplicate Detention No Parity Enter (twice) On line (in RS-232)
2. Verify that you are online in “REM RUN”. Change configuration driver F2 – PIC Baud Rate 19,200 Max Node 2 F7 Utility F5 Channel 0 (Master Mode) Power down and up
Publication 2755-6.8
Page 77
Downloading Match Codes via DH485 Protocol with an SLC or SLC Controller
SLC Ladder Logic
4–21
This section describes how to view match codes • in Slave Mode via the reader’s LEDs • in Slave Mode via ladder logic • in Master Mode via ladder logic
Viewing Match Codes in Slave Mode via the Reader’s LEDs Use a MSG Write command to download the Match Code Hex commands. The enable bit is toggled [F9] in order to make the download transition. The AdaptaScan I/O LED’s will indicate a good match or a No-Read or No-Match.
MSG Read/Write Type:
PEER-TO-PEER
Read/Write:
WRITE
Target Device:
485CIF
Local/Remote:
LOCAL
Control Block:
N7:200
Control Block Length:
14
Message Instruction Configuration Parameter Type Read/Write Target Device Local/Remote Control Block Channel Target Node Destination File Access Target Offset Message Length in Elements Message Timeout (seconds)
Configuration Peer-to-Peer Write 485CIF Local N7:200 0 2 N7:90 255 (Change 255 to 256 or 100H in the third word of the Control Block. An offset greater than 255 tells the MSG instruction that the SLC controller is talking to a bar code device.) 10 10
Publication 2755-6.8
Page 78
4–22
Downloading Match Codes via DH485 Protocol with an SLC or SLC Controller
Place the Match Code Hex command (Byte Swapped) in the Destination File Address N7:90. • example bar code string = 0300 • 0300 converted to hex = 30333030 • ASCII Hex command = 3F10CE010003040030333030 Byte Location Byte Swapped
N7:90
0
1
2
3
4
5
103F
01CE
0300
0004
3330
3030
You can verify whether or not a correct match code was downloaded by placing a bar code label in front of the reader so that it is scanned. Observe the Output LED’s on the top of the reader. When the downloaded match code matches a scanned label, the Output 1 will turn on, otherwise Output 2 will turn on (for no read or no match).
Viewing Match Code Downloads in Slave Mode via Ladder Logic Use the following SLC ladder logic for DH485 Slave Mode if the AdaptaScan I/O LEDs cannot be used for viewing.
]
B3
[
1
MSG Read/Write Type:
PEER-TO-PEER
Read/Write:
WRITE
Target Device:
485CIF
Local/Remote:
LOCAL
Control Block:
N7:200
Control Block Length:
]
B3 0
[
14
MSG Read/Write Type:
PEER-TO-PEER
Read/Write:
READ
Target Device:
485CIF
Local/Remote:
LOCAL
Control Block:
N7:50
Control Block Length:
14
Note: You can only initiate one read or one write at a time. Reads and writes should never be initiated at the same time.
Publication 2755-6.8
Page 79
Downloading Match Codes via DH485 Protocol with an SLC or SLC Controller
4–23
Message Instruction Configurations For the first Message Instruction, the configuration is listed in the table below. Parameter Type Read/Write Target Device Local/Remote Control Block Channel Target Node Destination File Access Target Offset Message Length in Elements Message Timeout (seconds)
Configuration Peer-to-Peer Write 485CIF Local N7:200 0 2 N7:90 255 (Change 255 to 256 or 100H in the third word of the Control Block. An offset greater than 255 tells the MSG instruction that the SLC controller is talking to a bar code device.) 10 10
For the second Message Instruction, the configuration is listed in the table below. Parameter Type Read/Write Target Device Local/Remote Control Block Channel Target Node Destination File Access Target Offset Message Length in Elements Message Timeout (seconds)
Configuration Peer-to-Peer Read 485CIF Local N7:50 0 2 N7:80 255 (Change 255 to 256 or 100H in the third word of the Control Block. An offset greater than 255 tells the MSG instruction that the SLC controller is talking to a bar code device.) 2 0
Publication 2755-6.8
Page 80
4–24
Downloading Match Codes via DH485 Protocol with an SLC or SLC Controller
Place the Match Code Hex command (Byte Swapped) in the Destination File Address N7:90. • example bar code string = 0300 • 0300 converted to hex = 30333030 • ASCII Hex command = 3F10CE010003040030333030 Byte Location Byte Swapped
N7:90
0
1
2
3
4
5
103F
01CE
0300
0004
3330
3030
In Slave Mode, file N7:80 will contain the response for a successful download (i.e. 3F90) or failure (i.e. 3F94). 3F90 Address (3F = 63)
Response Code (90 = Successful) (94 = Fail)
Note: The response cannot be displayed at the same time as the match code download. For this reason, an Examine If Close (XIC) contact B3:0 is used to control when the response is requested.
Publication 2755-6.8
Page 81
Downloading Match Codes via DH485 Protocol with an SLC or SLC Controller
4–25
Viewing Match Code Downloads in Master Mode via Ladder Logic Use the following SLC ladder logic for DH485 Master Mode if the AdaptaScan I/O LEDs cannot be used for viewing.
B3
]
[
0
Read/Write Type:
PEER-TO-PEER
Read/Write:
WRITE
Target Device:
485CIF
Local/Remote:
LOCAL
Control Block:
N7:100
Control Block Length:
14
Message Instruction Configuration Parameter
Configuration
Type Read/Write Target Device Local/Remote Control Block Channel Target Node Destination File Access Target Offset Message Length in Elements Message Timeout (seconds)
Peer-to-Peer Write 485CIF Local N7:100 0 2 N7:200 255 10 10
Place the Match Code Hex command (Byte Swapped) in the Destination File Address N7:200. • example bar code string = 0300 • 0300 converted to hex = 30333030 • ASCII Hex command = 3F10CE010003040030333030 Byte Location Byte Swapped
N7:200
0
1
2
3
4
5
103F
01CE
0300
0004
3330
3030
Publication 2755-6.8
Page 82
4–26
Downloading Match Codes via DH485 Protocol with an SLC or SLC Controller
In Master Mode, the N9:offset file will contain the response for a successful download (i.e. 3F90) or failure (i.e. 3F94). The offset address (such as N9:100) is configured in the AdaptaScan OLP software (DH485 dialog box). This offset can be any value from N9:00 to N9:255. 3F90 Address (3F = 63)
Publication 2755-6.8
Response Code (90 = Successful) (94 = Fail)