The text of a manual · part 12 of 41
AdaptaScan Bar Code Readers (Cat. Nos. 2755-SN3, -SN5, and -SN8) Application Guide: 6 - Communicating with an SLC over an RS-232 Link
Pages 96 to 106 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 96
Communicating with an over an RS-232 Link Overview
This application describes how to connect and configure an AdaptaScan Bar Code Reader to communicate with an SLC 5/03 or SLC 5/04 processor using an RS-232 serial connection. The application includes cable diagrams and configuration information for the AdaptaScan Readers. It also includes a sample SLC 500 program which is needed to establish communications through the RS-232 port of the SLC 5/03 (Frn 6.0) or 5/04.
Hardware Requirements
The hardware items required for this application are: • 2755-SN3, -SN5 or -SN8 AdaptaScan Bar Code Reader • 2755-NB40 or -NB41 Wiring Base • 2755-PW46 or -PW47 Power Supply • 2755-NC43 or -NC48 Configuration Cable • 1746 SLC 5/03 Enhanced (Frn 6.0) or 5/04 Processor • 1747 chassis • 1746 power supply • 1747-PIC module for communication between the processor and a personal computer • appropriate cables to program the SLC 5/03 or 5/04 • 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 • 9323-PA2x Advanced 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
In addition, you may want to refer to the SLC 500 Hardware and Software User Manuals.
Publication 2755-6.8
Page 97
6–2
Communicating with an over an RS-232 Link
Connecting an SLC Controller to the Reader
The SLC 5/03 or 5/04 occupies the first slot in a 1747 chassis. Power is supplied externally to the 1747 chassis. SLC 5/03, 5/04
Power Supply
RS-232 Cable AdaptaScan Reader
Host Port
Bulletin 1747 Chassis RS-232 User 0 Port
AdaptaScan Wiring Base RS232 Terminal Strip PIN
Configuring the SLC Controller
RS-232 Cable Pinouts
SLC 500 User Port 0 PIN
RX
3
TX
2
GND
5
The screens in this section show the software configuration for the SLC 5/03 or 5/04 using the APS Programming Software.
• Set the SLC 500 Channel 0 to USER in the Channel Configuration Screen.
Publication 2755-6.8
Page 98
Communicating with an over an RS-232 Link
6–3
• Configure Channel 0 in the Channel 0 User Mode Configuration screen.
Note: Termination 1 is set for \d or Carriage Return [CR], and Termination 2 is set for \a or Line Feed [LF]. These terminators, along with the ARL instruction in the SLC 500, allow the User port to read in one message at a time with [CR][LF] terminators.
SLC Ladder Logic Program
The sample ladder logic below instructs the SLC 5/03 or 5/04 to read one string of ASCII data terminated with [CR][LF].
Refer to the SLC 5/03 user manual for detailed information on using the SLC 5/03 or 5/04 programming software including the ASCII instructions.
Publication 2755-6.8
Page 99
6–4
Communicating with an over an RS-232 Link
Configuring the Reader
This section shows how to configure the AdaptaScan Bar Code Reader using the AdaptaScan Software (Catalog No. 2755-ASN). The procedures in this section show how to: • configure a DeviceNet address • configure a bar code label and symbol • configure the scanner • configure the decoder trigger • configure the serial port • configure the content and format of messages These procedures provide general guidelines for setting up an application. You may need to modify the configuration for your application needs.
Create a New Project Create a new project named SLC 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.
Publication 2755-6.8
Page 100
Communicating with an over an RS-232 Link
6–5
3. Choose Edit from the Project menu to rename the project SLC.
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 101
6–6
Communicating with an over an RS-232 Link
Define the DeviceNet Address 1. Click the Device button on the Project dialog.
2. Set the DeviceNet address. 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 102
Communicating with an over an RS-232 Link
6–7
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.
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.
Publication 2755-6.8
Page 103
6–8
Communicating with an over an RS-232 Link
Configure the Serial Port 1. Click the Serial Port button on the main Project dialog.
2. Verify that Terminal is selected in the Protocol list box. Also verify that the settings match the Channel 0 User settings. 3. Click the Edit button to open Terminal dialog. 4. Set the attributes as necessary.
5. Click OK to exit the dialog. 6. Click the Save and then the Close button on the Serial Port dialog to return to the main Project dialog.
Publication 2755-6.8
Page 104
Communicating with an over an RS-232 Link
6–9
Create a Message The Message dialogs define the format and content of message data sent to the host by the reader when bar codes are decoded. 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 define 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. 9. Click the Edit button to open the Message Field Edit dialog.
Publication 2755-6.8
Page 105
6–10
Communicating with an over an RS-232 Link
10. Under Replacement Strings, type no read in the Fail: field. Bar code data is sent to the controller on a valid read. The Fail string sends the characters “no read” when a no read occurs.
11. Click OK to return to the Message Field dialog. 12. Click OK to return to the Message dialog.
Define the Message Format The format of the message is defined below. 1. Click the Format button from the Message dialog. 2. In the Trailer field, type \r\n (Carriage Return, Line Feed). 3. Under Message Destination, select Serial Port.
4. Click OK to return to the Message dialog. 5. Click the Save button and then the Close button to return to the main Project dialog.
Publication 2755-6.8
Page 106
Communicating with an over an RS-232 Link
Sending the Configuration to the Reader
6–11
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 Bar Code Reader is configured correctly and the SLC programs are entered as shown in this application example, bar code data or “no read” will be sent to the SLC user port.
Publication 2755-6.8