The text of a manual · part 33 of 41
AdaptaScan Bar Code Readers (Cat. Nos. 2755-SN3, -SN5, and -SN8) Application Guide: 14 - Communicating with a 2760-RB Module on a DH-485 Network
Pages 271 to 285 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 271
-
Communicating with a 2760-RB Module on a DH-485 Network Overview
This application describes how to connect and configure an AdaptaScan Bar Code Reader to the 2760-RB interface module via DH485, using the 2760-SFC2 protocol cartridge. The application includes cable diagrams and configuration information for the AdaptaScan readers. It also includes a sample PLC-5 program which is needed to establish communication from the PLC-5 processor to the 2760-RB module.
Hardware Requirements
The hardware items required for this application are: • 2755-SN3, -SN5 or -SN8 AdaptaScan Bar Code Reader (v7.1 firmware or later) • 2755-NB40 or -NB41 Wiring Base • 2755-PW46 or -PW47 Power Supply • 2755-NC43 or -NC48 Configuration Cable • 2760-RB Interface Module • 1771 chassis • PLC-5 processor • 2760-SFC2 protocol cartridge • appropriate cables to program the PLC-5 and to configure the 2760-RB module and bar code reader. • Computer running Windows 3.1 (or later) or Windows 95 • 9-to-25 Pin Adapter (for computer with a 25-pin COM port)
Software Requirements
The software requirements for this application are: • 2755-ASN AdaptaScan Offline Programming Software • terminal emulation software to program the 2760-RB module • PLC-5 Programming Software
Related Publications
Publications you might want to refer to include: Publication
Description
2755-837
AdaptaScan Bar Code Readers User Manual
2755-838
AdaptaScan Software User Manual
2760-ND001
2760-RB Interface Module User Manual
2760-822
2760-SFC2 Protocol Cartridge User Manual
In addition, you may want to refer to the PLC-5 Hardware and Software User Manuals. Publication 2755-6.8
Page 272
14–2
Communicating with a 2760-RB Module on a DH-485 Network
PLC-5 Compatibility
Refer to the following table for hardware compatibility in this application example. with the following PLC-5 type
Use the following 2760-RB Interface Module type
New Generation PLC-5 (Series A, Rev. C or above) Refer to the sample PLC-5 program on page 14–5. (Set BT compatibility bit S26/4 while in program mode.) Refer to the sample PLC-5 program on page 14–6. (Add ladder logic using IIN update of RB. BTR must be before BTW.)
PLC-5, -15, -25, etc.
Series A, Rev. G or below Refer to the sample PLC-5 program on page 14–5. Series A, Rev. H or above
Connecting the RB Module to the Reader
The 2760-RB configuration example includes sample configuration screens and DIP switch settings needed to establish communication with the AdaptaScan Reader via DH-485. Dip Switch Side View
Switch pushed toward top (off position).
Switch pushed toward bottom (on position).
Classic PLC-5 Processor DIP Switches Switch #
Publication 2755-6.8
Switch Lever # 1
2
3
4
5
6
7
8
SW-1 on on on on on on on off
SW-2 on on on on on on on off
SW-3 on on off off
Not Applicable
Page 273
Communicating with a 2760-RB Module on a DH-485 Network
14–3
Enhanced PLC-5 Processor DIP Switches Switch #
Switch Lever # 1
2
3
4
5
6
7
8
9
10
SW-1 on on on on on on on on on off
SW-2 on on on off off on on off on off
I/O Chassis Backplane DIP Switches Switch Lever # 1
2
3
4
5
6
7
8 off off off off off on off off
2760-RB Module DIP Switches Switch #
Switch Lever # 1
2
3
4
5
6
7
8
SW-1 off off off off off off off off
SW-2 off off off off off off off off
SW-3 off off off off
SW-4 off off on off
Not Applicable
The 2760-RB module is placed in the 1771 chassis in slot 0 next to the PLC. For this application, the AdaptaScan Reader communicates through port 1 on the 2760-RB. A 1771-ASB module can also be used to communicate with the 2760-RB module over the chassis backplane to Remote I/O. Protocol Cartridge (Catalog No. 2760-SFC2)
Flexible Interface Module (Catalog No. 2760-RB) ASCII (Dumb) Terminal DH-485 AdaptaScan Bar Code Reader
Publication 2755-6.8
Page 274
14–4
Communicating with a 2760-RB Module on a DH-485 Network
Cabling Cable 1 must be constructed to connect a configuration terminal to the 2760-RB Module Configuration port. Cable 2 must be constructed to connect the RS485 port of the bar code reader wiring base to Port 1 on the 2760-RB module. Refer to following cabling diagrams. Cable 1 2760-RB (config. port)
Dumb Terminal (VT-1000)
25-pin D male
25-pin D female
Tx 2
3 Rx
Rx 3
2 Tx
GND 7
7 GND Cable 2
2760-RB Port 1 25-pin D male
Publication 2755-6.8
AdaptaScan RS-485/422 Terminal Strip RS-485
A
TxA
B
TxB
GND 7
GND
Page 275
Communicating with a 2760-RB Module on a DH-485 Network
Configuring the PLC-5 Processor
14–5
A sample PLC program appropriate for using a PLC 5/15/25 with a 2760-RB module appears below. | I:000 N7:0 N7:5 +–––––––––––––––––––––––+ | +–––] [–––––]/[––––––]/[––––––––+Block Transfer Read +––O––+ | 13 15 15 |Rack 0| | | |Group 0| | | |Module 0| | | |Control Block N7:100+––O––+ | |Length 0| | | |Continuous N| | | +–––––––––––––––––––––––+ | | | | | | Write | | Data N7:0 N7:5 +–––––––––––––––––––––––+ | +–––] [–––––]/[––––––]/[––––––––+Block Transfer Write | | | 15 15 |Rack 0| | | |Group 0+––O––+ | |Module 0| | | |Control Block N7:5| | | |Data File N7:200+––O––| | |Length 0| | | |Continuous N| | | +–––––––––––––––––––––––+ | | |
Refer to your PLC-5 Instruction Reference Manual for detailed information on using the PLC-5 programming software.
Publication 2755-6.8
Page 276
14–6
Communicating with a 2760-RB Module on a DH-485 Network
Using the 2760-RB Module, Revision H or Above, with the New Generation PLC-5 Processor When the 2760-RB, revision H or above, is used with the new generation PLC-5 processors in a local chassis, there is a possibility that the PLC will not see the BRR bit from the 2760-RB. For the PLC-5 to see the BTR bit, an odd number of image scans must occur. To ensure that the BTR instruction sees the BRR bit (bit 13) you must place an Immediate Input Instruction addressed to the BRR bit in another rung just before the Block Transfer Read (BTR) rung. This ensures that the BRR bit is seen by the NP-5 processor. | BRR BT7:5 BT7:25 000 | +–––]/[–––––]/[––––––]/[–––––––––––––––( IIN )––––––––––––––––+ | | | BTR | | BRR BT7:5 BT7:25 +––––––––––––––––––––––+ | +–––] [–––––]/[––––––]/[–––––––––+Rack 0| | | EN EN |Group 0| | | |Module 0+––O––+ | |Control Block BT7:5| | | |Data File N7:200| | | |Length 0+––O––+ | |Continuous N| | | +––––––––––––––––––––––+ | | | | | | Write BTW | | Data BT7:5 BT7:25 +––––––––––––––––––––––+ | +–––] [–––––]/[––––––]/[–––––––––+Rack 0| | | EN EN |Group 0| | | |Module 0+––O––+ | |Control Block BT7:25| | | |Data File N7:400| | | |Length 0+––O––+ | |Continuous N| | | +––––––––––––––––––––––+ | | | | | | | | |
Note: BTR must come before BTW. These parameters then need to be saved. Refer to your PLC-5 user manual for detailed information on using the PLC-5 programming software.
Configuring the 2760-RB Interface Module
The configuration screens for the 2760-RB should be entered exactly as shown. Both the bar code reader and the 2760-RB module are configured to send and recognize the Carriage Return [Cr], Line Feed [Lf] characters to identify a message. When the 2760–RB senses information entering Port 1, it will look for the Cr, Lf. When it sees these trailers, it will Block transfer read (BTR) the preceding bar code data into the PLC program.
Publication 2755-6.8
Page 277
Communicating with a 2760-RB Module on a DH-485 Network
14–7
To configure the 2760-RB module: 1. Set all 2760-RB module DIP switches to Off. 2. Connect the smart cable to the Configuration port of the 2760-RB module and the serial port of the computer. 3. Send a “break sequence” to the 2760-RB module via the Terminal Emulator: D. Set the baud rate to 9600, 8 data bits, 1 stop bit, no parity, no flow control, and either COM1 or COM2 depending on the smart cable connection. E. Program a function key to send the “break sequence” by using the Ctrl-Shift-Break command. (This step is specifically for Windows 3.1 Terminal Emulation.) F. Send the break sequence to call up the 2760-RB module configuration menu. 4. Select menu item 3: Device port protocol names. Set to: PORT1=COPYRIGHT 1989 ALLEN-BRADLEY COMPANY INC. 2760-SFC2 LAN SERIES A REVISION B (YES/NO)=YES
5. Select menu item 21: Identification numbers. Select: RS485 LAN 2755-DM6 ASCII MODE 0H (YES/NO)=YES 6. Select option 11: Configuration parameters. Set to: SLOT TIME (NO. CHARS) (DEC 0 ... 255) = 15 INTER-CHAR TIME (NO. CHARS) (DEC 0 ... 255) = 7 IDLE TIME (NO. CHARS) (DEC 0 ... 255) = 3 RETRIES (DEC 0 ... 255) = 3 19,200 BITS PER SECOND (YES/NO)=YES BCD NODE NUMBERS (ENABLE/DISABLE)= ENABLE BYTE SWAPPING (ENABLE/DISABLE)=ENABLE RECEIVE MATRIXING (ENABLE/DISABLE)=DISABLE MATRIX ADDRESS (HEX 0 ... FFFF) = 0 RE-ESTABLISH FREQUENCY (DEC 0 ... 255)=5 POLL FREQUENCY/DESTINATION [0] (HEX 0 ... FFFF)=5 POLL FREQUENCY/DESTINATION [1] (HEX 0 ... FFFF)=105 POLL FREQUENCY/DESTINATION [2] (HEX 0 ... FFFF)=5 POLL FREQUENCY/DESTINATION [3] (HEX 0 ... FFFF)=5
Type save or quit to exit out of the editor. 7. Verify that the 2760-RB is in chassis 0, group 0 module 0. 8. Save the above configuration.
Publication 2755-6.8
Page 278
14–8
Communicating with a 2760-RB Module on a DH-485 Network
Configuring the Bar Code Reader
This section shows how to configure the AdaptaScan Bar Code Reader (with v7.1 firmware or later) using the AdaptaScan Software (Catalog No. 2755-ASN). The procedures in this section show how to: • define the DeviceNet node address of the AdaptaScan Reader • configure a bar code label and symbol • configure the scanner • configure the decoder trigger • configure the serial port • configure the format of messages and the message destination The steps may vary for some procedures because of the different requirements of applications. For example, the bar code labels may vary from one application to the next.
Create a New Project Create a new project named RB_DH485 for the AdaptaScan Bar Code Readers. 1. Choose New from the Project menu to create a new project. 2. Click the New button to add a bar code reader to the project.
Publication 2755-6.8
Page 279
Communicating with a 2760-RB Module on a DH-485 Network
14–9
3. Choose Edit from the Project menu to rename the project RB_DH485.
4. Click Save to save the project under the new name and then Close to return to the Project dialog.
Define the Bar Code Label 1. Click the Labels button to open the Bar Code Labels dialog. 2. Click the New button to define a label.
3. Click the New button to define a symbol for the label.
4. Select a symbology and any other parameters (Identifier, Lengths) required by your application. 5. Click OK until you return to the Bar Code Labels dialog. 6. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
Page 280
14–10
Communicating with a 2760-RB Module on a DH-485 Network
Define the DeviceNet Address 1. Click the Device button on the Project dialog.
2. Set the DeviceNet address to 1. Note: The DeviceNet address is not always the same as the DH-485 node address. A DH-485 node address is assigned later. 3. Connect the 2755-NC43 or -NC48 Configuration Cable to the reader. 4. Click the Apply button. 5. Click Save and Close to return to the Project dialog.
Publication 2755-6.8
Page 281
Communicating with a 2760-RB Module on a DH-485 Network
14–11
Configure the Scanner 1. Click the Scanner button on the Project dialog to open the Scanner dialog.
2. Configure the scan pattern and use the Focus procedure for optimum scanner focus. 3. Click the Close button and return to the Project dialog.
Publication 2755-6.8
Page 282
14–12
Communicating with a 2760-RB Module on a DH-485 Network
Configure the Decoder Trigger This application uses a Timer to trigger the reader’s decoder. The Timer is typically used during application setup. Refer to Publication No. 2755-837 for other input sources that trigger the decoder. 1. Click the Decoder button from the main Project dialog. 2. Under Triggered By, select Timer from the Input list.
3. Click the Save button. 4. Click the Close button and return to the main Project dialog.
Configure the Serial Port 1. Click the Serial Port button from the Project dialog.
2. Configure the serial port as follows:
• From the Protocol list box, select DH-485 • From the Baud Rate list box, select 19,200 • From the Connection list box, select RS485 The configuration must match the host configuration.
Publication 2755-6.8
Page 283
Communicating with a 2760-RB Module on a DH-485 Network
14–13
3. Click the Edit button under Protocol to edit the DH-485 parameters.
Edit the parameters as follows:
• Select Slave under Master/Slave • From the Node list box, select 1 This is the node address of the reader on the network. 4. Click OK to return to the Serial Port dialog. 5. Click Save and then Close to return to the main Project dialog.
Publication 2755-6.8
Page 284
14–14
Communicating with a 2760-RB Module on a DH-485 Network
Create a Message Data sent from the AdaptaScan Reader to the RB module uses messages. 1. Click the Message button from the main Project dialog.
2. Under Triggered By, check the Enable check box. 3. Under Device, select Bar Code Reader 1. 4. Under Input, select [Decoder]. 5. Click the New button to create a message field.
6. Under Symbol Source, select Bar Code Reader 1. 7. Under Bar Code Labels & Symbols, select Symbol 1. 8. Check (enable) the Match Exactly check box.
Publication 2755-6.8
Page 285
Communicating with a 2760-RB Module on a DH-485 Network
14–15
9. Click the Edit button to open the Message Field Edit dialog.
10. Under Replacement Strings, type no read in the Fail: box. Bar code data is sent to the RB module on a valid read. The Fail string sends “no read” to the controller when a no read occurs on Bar Code Reader 1. 11. Click OK to return to the Message Field dialog. 12. Click OK again to return to the Message dialog.
Define the Message Format 1. Click the Format button from the Message dialog.
2. In the Trailer text box, type \r\n (for CR, LF). 3. Under Message Destination, select Serial Port. 4. Click OK to return to the Message dialog. 5. Click Save and then Close to return to the Project dialog.
Sending the Configuration to the Reader
From the main Project dialog, click the Send Device button to download the configuration to the bar code reader. Use the Monitor dialog to verify the decoding of bar code labels.
Publication 2755-6.8