Slc basic module code, Configuring the reader, Slc basic module code configuring the reader – Rockwell Automation 2755-SNx Adaptascan Bar Code Readers User Manual

Page 87

Advertising
background image

5–5

Communicating with a 1746-BAS BASIC Module

Publication 2755-6.8

Refer to the partial BASIC program listed below to in order for port
2 of the BASIC module to receive data and then send the data to
SLC M1 file.

10 PUSH 2 REM PRT2 ACTIVE FOR CALL 22

20 PUSH 6 REM PORT RECEIVING 6 BYTES OF DATA

30 PUSH 13 REM USE A <CR> FOR A TERMINATOR

40 PUSH 1 REM SEND DATA TO THE M1 FILE

50 PUSH 0 REM OFFSET TO M1 FILE

55 PUSH 0 REM STRING NUMBER – NOT USED

60 PUSH 1 REM BYTE SWAPPING ENABLED

70 CALL 22 REM IMPLEMENT CALL STATEMENT

80 POP X REM STATUS OF CALL 22 INSTRUCTION

90 END

Make sure that the serial port of the BASIC module is set up the
same as the AdaptaScan serial port.

This section shows how to configure the AdaptaScan Reader using
the AdaptaScan software.

The procedures listed in this section show how to:

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

Create a New Project

Create a new project named 1746 BASIC Module for the
AdaptaScan Bar Code Reader.

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.

SLC BASIC Module Code

Configuring the Reader

Advertising