Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 28 of 41

AdaptaScan Bar Code Readers (Cat. Nos. 2755-SN3, -SN5, and -SN8) Application Guide: 12 - Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging, pages 231 to 239

Pages 231 to 239 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 231

12–10

Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging

10. Click the Datatable Map button to open the Datatable Map dialog. The dialog shows the data table map of the N23 file. The data from the AdaptaScan Reader is mapped to the PLC (BTR N23).

• Word 0 is reserved • 4 words (8 bytes) are mapped for the incoming string from the AdaptaScan Reader. • Bit 15 is the ‘new message being sent’ bit.

11. Click the Data Entry button. 12. Change Map Data From to Poll Message. 13. Change Map Data To Block Transfer 62. 14. Change N23:0 to 1. 15. Change No. Bits to 64. 16. Click Apply Segment.

Publication 2755-6.8

Page 232

Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging

12–11

17. Next to Data Map, select Output to view the output file (N22). The dialog shows the data table map for the N22 file. The data map represents data sent to the AdaptaScan Reader through the SDN Scanner (BTW N22)

• Word 1 writes one byte of data to the module. • Bit 7 of word 1 is the ‘send next message’ bit.

18. Change Map Data From to Poll Message. 19. Change Map Data To Block Transfer 62. 20. Change N22:0 to 1. 21. Change No. Bits to 8. 22. Click Apply Segment button. 23. Click Close to return the Scan List Editor dialog. 24. Click the Save To File button and then the Save to SDN button to download the scan list the 1771-SDN Scanner. Important:

Before clicking the Save to SDN button , the SDN Scanner must be in Idle Mode. Set bit 0 of word 0 in the BTW N22 file to 0 (N22:0/0=0). Another way to place the SDN Scanner in Idle Mode is to put the PLC into Program Mode.

Publication 2755-6.8

Page 233

12–12

Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging

Configuring the Reader

This section shows how to configure the AdaptaScan Bar Code Reader using AdaptaScan Software (Catalog No. 2755-ASN). The procedures in this section show how to: • scan/decode 4 character, Interleaved 2 of 5 labels • define a DeviceNet address • configure the scanner • configure the decoder trigger • configure the format of messages and the message destination

Create a New Project Create a new project named PLC DeviceNet Master/Slave for one AdaptaScan Bar Code Reader (Bar Code Reader 1). 1. Choose New from the Project menu to create a new project. 2. Click the New button to add a bar code reader (Bar Code Reader 1) to the project.

3. Choose Edit from the Project menu to rename the project PLC DeviceNet Master/Slave.

If you need to change the baud rate, proceed to the next section. If you do not need to change the baud rate, proceed to step 4.

Publication 2755-6.8

Page 234

Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging

12–13

4. Click Save to save the project under the new name and then Close to return to the Project dialog.

Change the Baud Rate If you need to change the baud rate: 1. Click on the K Baud button and select the desired baud rate.

2. Click Save and Close to return to the Project dialog. 3. Click the Device button. 4. Click Apply if the desired baud rate is shown. 5. Click Save and Close to return to the Project dialog. 6. Click the Send Device button.

Publication 2755-6.8

Page 235

12–14

Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging

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. From the Symbology list, select Interleaved 2 of 5. 5. Under Lengths, select the Length 1 check box and then type 4 in the Through box. This indicates a 4 character length for Interleaved 2 of 5 labels. 6. Click OK until you return to the Bar Code Labels dialog. 7. Click Save and then Close to return to the Project dialog.

Publication 2755-6.8

Page 236

Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging

12–15

Define the DeviceNet Address 1. Click the Device button on the Project dialog.

2. Set the DeviceNet address to 3. 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.

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 237

12–16

Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging

Configure the Decoder Trigger To test the application, use the Timer to trigger the reader’s 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.

Create a Message This section defines the content of messages sent to the 1771-SDN Scanner. 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].

Publication 2755-6.8

Page 238

Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging

12–17

5. Click the New button to create a message field.

6. Under Symbol Source, select Bar Code Reader 1. 7. Under Bar Code Label & Symbols, select Symbol 1. 8. Check (enable) the Match Exactly check box. 9. Click the Edit button to open the Message Field Edit dialog.

10. Under Replacement Strings, type nr in the Fail: field. Bar code data is sent to the 1771-SDN Scanner on a valid read; the Fail string sends the characters nr when a no read occurs. 11. Under Data Format, type 4 in the Length box. Important:

The Length must match the number of characters in the bar code symbol. This application uses 4 character, Interleaved 2 of 5 symbols.

12. Click OK to return to the Message Field dialog. 13. Click OK to return to the Message dialog.

Publication 2755-6.8

Page 239

12–18

Communicating with a PLC-5 Processor on a DeviceNet Network using Explicit Messaging

Define the Message Format The section defines the format and destination of the messages sent from the reader. 1. Click the Format button from the Message dialog.

2. Under Message Destination, select DeviceNet. 3. Accept the defaults for all other parameters. 4. Click OK to return to the Message dialog. 5. Click Save and then Close to return to the main 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.

Running the Application

If the: • AdaptaScan Reader is configured correctly • 1771-SDN Scanner is configured correctly • ladder program is entered as shown in this application you will see bar code data or ‘nr’ in the PLC BTR (N23) file. Remember that all data is byte swapped.

Publication 2755-6.8