Programming the basic module – Rockwell Automation 2755-SNx Adaptascan Bar Code Readers User Manual
Page 86

5–4
Communicating with a 1746-BAS BASIC Module
Publication 2755-6.8
Refer to the following steps to program the BASIC module.
1. Make sure the BASIC Development Software is loaded onto your
personal computer. Refer to the BASIC Development Software
Programming Manual (Publication No. 1746-6.2) for
downloading information.
2. Create a project file.
3. Type in the following program. This program will port 2 of the
BASIC module to receive data and then send the data to the 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
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
4. Press F1 to save the program.
5. Press
Esc to return to the Main Menu.
6. Select Terminal [RS–232]. Press Enter.
7. Press F2. Select setup. Select Autobaud. Select Yes. The
default baud rate (1200) should appear.
8. Press F2. Select setup. Select Com Port settings. Verify that
your communication port settings are correct.
9. Press Enter.
10. Press Enter to save your setup.
11. Press F2.
12. Press Enter.
13. Connect your PC to the BASIC module.
14. Select Download from host to module. Press Enter. Type in the
name of your program (from step 4). Press Enter. Your program
should now appear on the screen.
15. Type Run and press Enter. Ready should appear on your screen
indicating the program ran successfully.
Programming the BASIC
Module