BASIC Interface Software for Windows 1747-WINBAS Programming Manual
Important User Information Solid state equipment has operational characteristics differing from those of electromechanical equipment. Safety Guidelines for the Application, Installation and Maintenance of Solid State Controls (publication SGI-1.1 available from your local Rockwell Automation sales office or online at http://literature.rockwellautomation.com) describes some important differences between solid state equipment and hard-wired electromechanical devices.
Table of Contents Preface Who Should Use This Manual . . . Purpose of This Manual. . . . . . . . Additional Resources . . . . . . . Conventions Used in This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 4 4 Overview . . . . . . . . . . . . . . . . . . . . . . . . . Installing the Software. . . . . . . . . . . . . . . . Install the 1747-WINBAS Software .
2 Table of Contents Index Publication 1747-PM001A-EN-P - January 2007
Preface Read this preface to familiarize yourself with the rest of the manual. This preface covers the these topics: • Who should use this manual • Purpose of this manual • Conventions used in this manual Who Should Use This Manual Use this manual if you are responsible for designing, installing, programming, or troubleshooting control systems that use Allen-Bradley small logic controllers.
4 Preface Additional Resources These documents contain additional information regarding Rockwell Automation products.
Chapter 1 Installing Your BASIC Interface Software This chapter provides overview information regarding the 1747-WINBAS Windows Compatible BASIC Module Interface Software. Overview BASIC software is a terminal emulation program specifically written for you to interface to a Rockwell Automation 1746-BAS, 1746-BAS-T, or 1771-DB BASIC module. BASIC software simplifies the uploading and downloading of BASIC module programs, as well as backing up and restoring complete module images.
6 Installing Your BASIC Interface Software BASIC Interface Software Client Window Installing the Software The BASIC software is comprised of two CDs. They are: • the 1747-WINBAS software CD. • the optional RSLinx Classic OEM version software CD. The 1747-WINBAS software enables communication to the 1747-BAS module via an RS-232 serial port. The RSLinx Classic OEM version software enables communication to the 1747-BAS module via the DH-485 port.
Installing Your BASIC Interface Software 7 Install the RSLinx Classic OEM Software To install the RSLinx Classic OEM software (only necessary if connecting to the BAS module using DH-485), insert the RSLinx Classic OEM software CD into your CD drive and follow the installation instructions.
8 Installing Your BASIC Interface Software Notes: Publication 1747-PM001A-EN-P - January 2007
Chapter 2 Getting Familiar With Your BASIC Interface Software This chapter is intended to give you an overview of the BASIC Interface Software so you can understand the software’s general structure. Main Menu These menus are accessed through the Main menu: • • • • File View Tools Help Main Menu File Menu You can save and print programs from the File menu.
10 Getting Familiar With Your BASIC Interface Software • File > Save saves the data to a file for later reference. This command will also result in the new file name being displayed in the title bar. The files are not appended. If you save the data to the same file twice, the data that was first saved will be lost. The data is saved as ASCII text exactly as it appears on the BASIC software dialog. • File > Save As saves the data to a file for later reference.
Getting Familiar With Your BASIC Interface Software Tools Menu 11 The Tools menu lets you interface with your BASIC module. Tools Menu Cancel Xoff, Send Xon From the Tools menu, you can choose the following options: • Tools > Cancel Xoff clears an internal flag that indicates the attached module has sent an Xoff to BASIC software. Only choose Tools > Cancel Xoff on rare occasions. There are situations when you are working with multiple BASIC modules. One module may send an Xoff to BASIC software.
12 Getting Familiar With Your BASIC Interface Software Debug Tools > Debug opens a dialog that aids you in debugging the BASIC program. The Variable Watch List box on the upper left side of the dialog displays the variables you added. The buttons to the right of the Variable Watch List box lets you add variables to the Watch List, remove variables from the Watch List, get the latest values for the variables in the Watch List and inspect strings in detail.
Getting Familiar With Your BASIC Interface Software 13 The following dialog shows the Debug Window with the same variables after clicking Update Data. Variables in Watch List After Update It may be difficult to count the number of characters in the strings and determine a character’s precise location in the string. This dialog displays when you select a string in the Watch List Variable by clicking Inspect String.
14 Getting Familiar With Your BASIC Interface Software Below the Watch List box and in the middle are two buttons that either set or clear a BASIC-program break point. The BASIC modules allow only one break point to be set at a time. When this break point is encountered during program execution, the program stops and the BASIC module goes to the command prompt. Also, the break point is automatically cleared by the module after it is encountered.
Getting Familiar With Your BASIC Interface Software 15 Line Number Dialog • Tools > List NUM1-NUM2 opens a dialog that lets you enter the first line number (NUM1). If a valid line number is entered, then the same dialog is cleared for entry of the second line number (NUM2). Then the BASIC LIST command is sent to the module followed by both line numbers separated by a dash (for example, LIST 100-200).
16 Getting Familiar With Your BASIC Interface Software Xfer Tools > Xfer sends a XFER command to the BASIC module. Use the XFER command to transfer the currently selected program in ROM to RAM and select RAM mode. After the XFER command executes, you can edit the program in the same way you would edit any RAM program. Erase and Prog From the Tools menu, you can choose the following options: • Tools > Erase sends an ERASE command to the BASIC module.
Getting Familiar With Your BASIC Interface Software 17 • Tools > Hex Download opens a dialog that lets you enter/select a file name (default extension .hex). BASIC software then sends a CALL 100 command and downloads the specified Intel Hex file to the module. Hex Download Information Dialog Module Backup and Restore From the Tools menu, you can choose the following options: • Tools > Module Backup opens a dialog that lets you enter a file name. This file name (default extension .
18 Getting Familiar With Your BASIC Interface Software • Tools > Module Restore opens a dialog that lets you enter a file name (default extension.IMG). If the above file name is valid, the module type matches, and the module firmware revision matches, then the dialog lets you decide whether to restore the battery backed variables. The file name is used to restore this connected BASIC module exactly like the module used to produce the original backup.
Getting Familiar With Your BASIC Interface Software Help Menu 19 The Help menu provides you with a resource to locate information you need to keep your program operational. From the Help menu, you can choose the following options: • Help > About WINBAS will open as the dialog that identifies the release and contact information. About 1747-WINBAS Dialog • Help > BAS Users Manual opens the SLC 500 BASIC and BASIC-T Modules User Manual, publication 1746-UM004.
20 Getting Familiar With Your BASIC Interface Software Standard Toolbar Icons There are nine choices on the standard toolbar. 1 Publication 1747-PM001A-EN-P - January 2007 2 3 4 5 6 7 8 9 Icon Number Description 1 Performs the same function as File > New. It clears all the old data from the history buffer and the screen. 2 Performs the same function as File > Save. 3 Transmits a RUN command followed by an ENTER out the serial port to the attached BASIC module.
Getting Familiar With Your BASIC Interface Software 21 Configure the Serial Port Follow these steps to configure the serial port. 1. Click the hand-on-paper icon. See icon number 8 on page 20. The following dialog appears. 2. • • • • • • From each pull-down menu, choose a value for each parameter.
22 Getting Familiar With Your BASIC Interface Software Port Configuration Dialog Options Parameter Value Connect using COM1, COM2, COM3, COM4, or DH-485(1) Bits per second 300, 1200, 2400, 4800, 9600, 19,200, 38,400, 57,600, or 115,200 Data bits 7 or 8 Parity None, even, or odd Stop bits 1 or 2 Flow control None or Xon/Xoff OK button • Saves the configuration. • Reconfigures the appropriate port. • Exits the configuration dialog returning you to the BASIC Interface main program.
Getting Familiar With Your BASIC Interface Software 23 Acceptable DH-485 interfaces are the 1784-PCMK, 1784-PKTX, 1784-PKTXD, or 1747-UIC convertor. Bridging to the DH-485 network from other networks is not supported. You must go through the selections shown in this dialog and double-click the correct BASIC module.
24 Getting Familiar With Your BASIC Interface Software User Window The user window is the client area where the data received via the port is displayed. There is a vertical scroll bar on the right side of the window and a horizontal scroll bar on the bottom of the window. The vertical scroll bar lets you view data that has scrolled off the viewable page. The horizontal scroll bar lets you view data that exceeds the width of the user window. Up to 128 characters can be displayed per line.
Getting Familiar With Your BASIC Interface Software 25 Editing a BASIC Program When you right-click Edit Line in the pop-up menu, the BASIC software opens an edit dialog that lets you edit any BASIC line of code. The edit box in this Edit Line dialog is automatically loaded with the BASIC line being pointed at when you right-clicked the mouse. You can modify this line in any fashion. If you clicked Enter Line, this modified line will be downloaded to the BASIC module.
26 Getting Familiar With Your BASIC Interface Software Status Bar The BASIC software status bar is at the very bottom of the user window and is divided into five sections. Button Description User Help When you move the cursor over any menu item or the tool bar icon, a description of the function or icon appears. COM Port Status See COM Port Status section. Caps Lock Provides capitalization status. Num Lock Provides numbering status. Scroll Lock Provides scroll status.
Getting Familiar With Your BASIC Interface Software 27 If you select a DH-485 port, the following four pieces of information are displayed: • • • • Availability of the BASIC software DH-485 connection DH-485 RSLinx function return code DH-485 connection return code For example, DH-485 0 0 indicates that the BASIC software is connected to a BASIC module via the DH-485 network, and that there are no problems.
28 Getting Familiar With Your BASIC Interface Software Notes: Publication 1747-PM001A-EN-P - January 2007
Appendix A Keystroke Commands Keystroke Overview 29 Windows programs typically support several keystroke commands that have been modified for use with BASIC Interface Software. Keystroke Effect on BASIC Interface Software Ctrl+C Transmits a Ctrl+C (O3h) command from the serial port. Ctrl+N Transmits a Ctrl+N (OEh = ASCII S0 character) command from the serial port. Ctrl+O Transmits a Ctrl+O (OFh = ASCII SI character) command from the serial port.
30 Keystroke Commands Publication 1747-PM001A-EN-P - January 2007 Keystroke Effect on BASIC Interface Software Left arrow Transmits an ESC [D command. Right arrow Transmits an ESC [C command. F1 Transmits an ESC O P command. F2 Transmits an ESC O Q command. F3 Transmits an ESC O R command. F4 Transmits an ESC O S command.
Appendix B Escape Sequences Escape Sequence Overview Escape sequences are supported by BASIC Interface Software. The fully-supported escape sequences are listed in this table. Escape Sequence Description ESC[#1;#2H Moves cursor to line 1 and column 2. ESC[#1;#2f Moves cursor to line 1 and column 2. ESC[#A Moves cursor up set number of lines. ESC[#B Moves cursor down set number of lines. ESC[#C Moves cursor forward set number of spaces. ESC[#D Moves cursor back set number of spaces.
32 Escape Sequences Notes: Publication 1747-PM001A-EN-P - January 2007
Index C configure the serial port 21 conventions used in this manual 4 O options 14 overview software 5 D P debug 12 E edit a BASIC program 25 erase 16 escape sequences 31 F file menu 9 port status 26 print a program 9 prog 16 purpose of manual 3 R RAM 15 related documentation 4 ROM 15 H help menu 19 hex download 16 hex upload 16 I install the software 6 S save a program 9 software edit a program 25 installation 6 overview 5 print a program 9 save a program 9 status bar 26 K T keystroke command
34 Index Publication 1747-PM001A-EN-P - January 2007
How Are We Doing? Your comments on our technical publications will help us serve you better in the future. Thank you for taking the time to provide us feedback. You can complete this form and mail (or fax) it back to us or email us at RADocumentComments@ra.rockwell.com Pub. Title/Type BASIC Interface Software Programming Manual Cat. No. 1747-WINBAS Pub. No. 1747-PM001A-EN-P Pub. Date January 2007 Part No. none Please complete the sections below.
PLEASE FASTEN HERE (DO NOT STAPLE) PLEASE FOLD HERE NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES BUSINESS REPLY MAIL FIRST-CLASS MAIL PERMIT NO.
Rockwell Automation Support Rockwell Automation provides technical information on the Web to assist you in using its products. At http://support.rockwellautomation.com, you can find technical manuals, a knowledge base of FAQs, technical and application notes, sample code and links to software service packs, and a MySupport feature that you can customize to make the best use of these tools.