Rockwell Automation 1747-PBASE User Manual

BASIC Development Software
(Catalog Numbers 1747-PBASE)
Programming Manual

Important User Information

Because of the variety of uses for the products described in this publication, those responsible for the application and use of this control equipment must satisfy themselves that all necessary steps have been taken to assure that each application and use meets all performance and safety requirements, including any applicable laws, regulations, codes and standards.
The illustrations, charts, sample programs and layout examples shown in this guide are intended solely for purposes of example. Since there are many variables and requirements associated with any particular installation, Rockwell International Corporation does not assume responsibility or liability (to include intellectual property liability) for actual use based upon the examples shown in this publication.
Rockwell Automation publication SGI-1.1, Safety Guidelines for the Application, Installation and Maintenance of Solid-State Control (available from your local Rockwell Automation office), describes some important differences between solid-state equipment and electromechanical devices that should be taken into consideration when applying products such as those described in this publication.
Reproduction of the contents of this copyrighted publication, in whole or part, without written permission of Rockwell Automation, is prohibited.
Throughout this manual we use notes to make you aware of safety considerations:
ATTENTION
!
Attention statements help you to:
identify a hazard
avoid a hazard
recognize the consequences
IMPORTANT
PLC-5 is a registered trademark; and SLC 500, RSLogix, and RSLinx are trademarks of Rockwell Automation.
Identifies information about practices or circumstances that can lead to personal injury or death, property damage or economic loss.
Identifies information that is critical for successful application and understanding of the product.
Installing the Software

Table of Contents

Preface
Who Should Use This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-1
Purpose of this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-2
Terms and Abbreviations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-4
Conventions Used in this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-5
Rockwell Automation Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-5
Local Product Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-5
Technical Product Assistance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-5
Your Questions or Comments on this Manual . . . . . . . . . . . . . . . P-6
Chapter 1
What Your Software Does. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Hardware for Interfacing Your Personal Computer with the
BASIC or BASIC-T Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Installation Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Backing-up Your Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6
Getting Familiar with Your Development Software
Chapter 2
Starting Your Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Toplevel Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Main Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Status Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Message Line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Function Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Using Help Outside a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Using Help Within a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Typical Pull-down Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Navigating Within Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Editing a BASIC Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
General Editing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
Saving Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10
Translating Your Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Physically Connecting to Your BASIC or BASIC-T Module . . . . 2-11
Changing to Terminal Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Downloading Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
Exiting a BASIC Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13
i Publication 1746-PM001A-US-P
Table of Contents ii
Configuring Your Software
Chapter 3
Setup and Configuration Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Command Line Switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Loading Files from the Command Line . . . . . . . . . . . . . . . . . . . . 3-4
Configuring Your Edit Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Configuring Display Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Configuring Mouse and Keyboard Options . . . . . . . . . . . . . . . . . . . . 3-7
Configuring Your Filename Extensions. . . . . . . . . . . . . . . . . . . . . . . . 3-8
Configuring Your Printer Options . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Configuring Your Memory Options . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Backup Files, Temporary Files, and Autosave . . . . . . . . . . . . . . . . . . 3-12
Backup Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Temporary Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Autosave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Search and Replace Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
Terminal Emulation Mode Selection . . . . . . . . . . . . . . . . . . . . . . . . 3-13
Save Configuration and Exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Editing a Program
Manipulating Files
Chapter 4
Using Simple Editing Techniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
Searching Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Using Block Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Text Formatting, Undo, and Redo . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
Advanced Editing Techniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Drawing Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
Using the Calculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
The ASCII Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Using Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Using Keystroke Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11
Using Cursor Markers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
Chapter 5
The File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Selecting Project Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
User Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
User-defined Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Name Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Selecting a Filename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Swap Method Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Memory Required Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Use COMMAND.COM Option . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Starting Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Publication 1746-PM001A-US-P
Writing Programs Using the BASIC Development Language
Table of Contents iii
Chapter 6
Overview of the Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
Translator Directives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Include . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
Line Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Increment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Debug on
Debug off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Creating Your Own Programming Macro . . . . . . . . . . . . . . . . . . . . . . 6-8
Bringing in Programs from Separate Files . . . . . . . . . . . . . . . . . . . . . . 6-9
Subprogram CALL 70, CALL 71 . . . . . . . . . . . . . . . . . . . . . . . . 6-10
Programming Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
Merging a Program File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
Creating a Second Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
Entering the Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
Translating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-13
Downloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
Executing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
Printing Your Program
Translating Your Program
Chapter 7
Setting Up Your Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
Printer Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Printer Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Printer Device/File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Serial Printers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Using the Printer Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Copies to Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Line Numbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Print Margin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Eject Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Printing All or Part of a Document . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Printing In Background. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Chapter 8
Translating Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1
Eliminating Translator Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Find Next Compiler Error. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Translator Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Publication 1746-PM001A-US-P
Table of Contents iv
Communicating with the Module
Chapter 9
Changing to Terminal Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-1
Downloading File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Uploading File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4
Hex File Transfers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6
Uploading Hex Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6
Downloading Hex Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7
Backing Up the Module Image . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
Restoring the Module Image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Debugging Your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Debugging Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
Making Corrections to Your Program. . . . . . . . . . . . . . . . . . . . . 9-14
RS-232 Communications Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14
Autobaud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15
General Setup Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-16
Terminal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-16
Com Port Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-16
Colors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17
Save Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17
DH485 Communications Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18
Attach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-18
General Setup Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19
Terminal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19
Com Port Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-20
Who Active. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21
Who Listen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22
Colors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22
Save Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-22
BASIC Macro Library
Publication 1746-PM001A-US-P
Appendix A
Library Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
Screen Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Keyboard Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
SLC Backplane Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Clock Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-5
Battery Back-Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Program Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
String Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-7
[CTRL-C] Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-8
Port Control Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-8
DH485 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-8
1771-DB/B Backplane Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-9
The DOS Directory Shell
Table of Contents v
Appendix B
Using the DOS Directory Shell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1
DOS Directory Shell Operation. . . . . . . . . . . . . . . . . . . . . . . . . . B-2
File Operations from the DOS Directory Shell . . . . . . . . . . . . . . . B-4
Publication 1746-PM001A-US-P
Table of Contents vi
Publication 1746-PM001A-US-P
Preface
Read this preface to familiarize yourself with the rest of the manual. This preface covers the following topics:
who should use this manual
the purpose of this manual
how to use this manual
terms and abbreviations
conventions used in this manual
Rockwell Automation support

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.
You should have a basic understanding of SLC 500™ products, PLC products, and 1771 and 1746 I/O products. You should understand programmable controllers and be able to interpret the ladder logic instructions required to control your application. If you do not, contact your local Rockwell Automation representative for information on available training courses before using this product.
P-1 Publication 1746-PM001A- US-P
P-2

Purpose of this Manual

This manual is a programming guide when using the BASIC Development Software, 1747-PBASE.
Chapter Title Contents
Preface Describes the purpose, background, and scope of this manual. Also lists related
publications.
1 Installing the Software Described how to install the BASIC Development Software onto your personal
computer.
2 Getting Familiar with Your
Development Software
3 Configuring Your Software Provides information on a number of configuration options including mouse,
4 Editing a Program Covers all editing techniques, including searches, moving blocks of text, text
5 Manipulating Files Provides information on file management, from simple loads, saves, and merges,
6 Writing Programs Using the
BASIC Development Language
7 Printing Your Program Covers all aspects of printer setup and printing.
8 Translating Your Program Prepares your BASIC development program for downloading to the BASIC or
Describes the basic concepts of the BASIC Development Software, including how the help system works, using the pull-down menus, and creating a simple first program.
display, printer, memory, function keys, and Terminal mode.
formatting, and advanced editing features.
to creating your own User Menus.
Begins with an overview of the BASIC language, macros, and program organization. A second sample program is written, translated and downloaded.
BASIC-T module.
9 Communicating with the BASIC
or BASIC-T Module
Appendix A BASIC Macro Library Lists the programming macros available through the BASIC Development
Appendix B The DOS Directory Shell Explains how to display a DOS directory tree and directory from which you can
Provides information on changing to Terminal mode, downloading to and uploading from the module, and debugging your BASIC program.
Software.
execute a large number of DOS commands.
Publication 1746-PM001A-US-P
Related Documentation
The following documents contain additional information regarding Rockwell Automation products. To obtain a copy, contact your local Rockwell Automation office or distributor.
For Read this document Publication Number
P-3
A BASIC and BASIC-T manual that provides information on installing and using the 1746-BAS and 1746-BAS-T modules.
A reference manual that explains the BASIC language as used with the BASIC and BASIC-T modules.
A user manual that provides information on installing and using the 1771-DB/B module.
An overview of the SLC 500 family of products SLC 500™ System Overview 1747-SO001A-US-P
A description of how to install and use a Modular SLC 500 Processor
A reference manual that contains status file data and instruction set information for SLC 500 processors
A description of how to install and use a module that acts as a bridge between DH485 networks and devices requiring DF1 protocol.
In-depth information on grounding and wiring Allen-Bradley programmable controllers
A glossary of industrial automation terms and abbreviations
An article on wire sizes and types for grounding electrical equipment
SLC 500™ BASIC and BASIC-T Modules User Manual
BASIC Language Reference Manual 1746-RM001A-US-P
BASIC Module User Manual 1771-6.5.113
Modular Hardware Style Installation and Operation Manual
SLC 500™ and MicroLogix™ 1000 Instruction Set Reference Manual
DH-485/RS-232C Interface Module User’s Manual
Allen-Bradley Programmable Controller Grounding and Wiring Guidelines
Allen-Bradley Industrial Automation Glossary
National Electric Code Published by the National Fire Protection
1746-UM004A-US-P
1747-6.2
1747-6.15
1747-6.12
1770-4.1
AG-7.1
Association of Boston, MA
Publication 1746-PM001A-US-P
P-4

Terms and Abbreviations

The following terms and abbreviations are specific to this product. For a complete listing of Allen-Bradley terminology, refer to the Allen-Bradley Industrial Automation Glossary, publication number ICCG-7.1.
A-Stack error — occurs when too many expressions are PUSHed onto the
argument stack or when you attempt to POP data that does not exist
BASIC development language enhanced BASIC language that comes with
the BASIC Development Software (catalog number 1747-PBASE) and provides programming support for the BASIC and BASIC-T modules.
DH485 network communication protocol
dialog box — a box that appears on the screen of the BASIC Development
Software displaying available options for a selected menu item
EMS — refers to the expanded memory that may be installed on your personal
computer. The BASIC Development Software uses expanded memory not extended memory.
EPROM Erasable Programmable Read Only Memory
file — a BASIC program file
filename extension — the characters to the right of the filename and period.
Hypertext help — a context-sensitive help system that allows access to help
from practically any point in the BASIC Development Software.
keystroke macros — a recorded series of keystrokes invoked by one keystroke
to reduce the number of keystrokes needed to perform a function
memory module — BASIC or BASIC-T modules EEPROM or UVPROM
MTOP system control value that holds the last valid memory address
program port — the port used to program the module. Either PRT1 or port
DH485 can be used as the program port.
programming macros — commands available through the BASIC
Development Software designed to streamline programming
QuickStroke — refers to a key or pair of keys that are pressed rapidly to
perform a function or access a menu. These keys are shown within braces for example,
[Alt-F10].
[],
RAM — Random Access Memory
ROM — Read Only Memory, refers to the optional memory module memory
space (EEPROM or UVPROM)
RS-232/423 serial communication interface
RS-422 differential communication interface
RS-485 network communication interface
SLC 500 SLC 500 fixed and modular controller
Publication 1746-PM001A-US-P
P-5

Conventions Used in this Manual

Rockwell Automation Support

The following conventions are used throughout this manual:
Bulleted lists such as this one provide information, not procedural steps.
Numbered lists provide sequential steps or hierarchical information.
Italic type is used for emphasis.
Tex t i n this font indicates words or phrases you should type.
Key names match the names shown and appear in bold, capital letters within
brackets (for example,
The progression to arrive at a screen through a menu path is shown as follows:
Path: Toplevel menu →→→ Edit mode →→→→ File →→→→ load file in cur.win.
The progression to arrive at a screen through a QuickStroke is shown as
follows:
QuickStroke: <SHIFT-F5>
Rockwell Automation offers support services worldwide, with over 75 Sales/ Support Offices, 512 authorized Distributors and 260 authorized Systems Integrators located throughout the United States alone, plus Rockwell Automation representatives in every major country in the world.
[ENTER]).
Local Product Support
Contact your local Rockwell Automation representative for:
sales and order support
product technical training
warranty support
support service agreements
Technical Product Assistance
If you need to contact Rockwell Automation for technical assistance, please review the information in the appropriate chapter first. Then call your local Rockwell Automation representative.
Publication 1746-PM001A-US-P
P-6
Your Questions or Comments on this Manual
If you find a problem with this manual, please notify us of it on the enclosed Publication Problem Report.
If you have any suggestions for how this manual could be made more useful to you, please contact us at the address below:
Rockwell Automation Control and Information Group Technical Communication, Dept. A602V P.O. Box 2086 Milwaukee, WI 53201-2086
Publication 1746-PM001A-US-P
Chapter

Installing the Software

This chapter begins with a general description of your BASIC Development Software and then steps you through installing the software on your personal computer. Major topics include:
a general description of the BASIC Development Software
the necessary hardware for installation
the BASIC Development Software disk sets
how to install your software
how to back up your disks
1

What Your Software Does

This section provides a general outline of what the BASIC Development Software can do. Standard features of the BASIC Development Software include:
communication terminal capabilities
debugger feature to troubleshoot software that is executing on the BASIC or
BASIC-T module
translator utility to convert BASIC Development Software programs for
downloading to the module
windows that allow you to edit up to 100 files (or different parts of the same
files) simultaneously
adjacent window function for easy movement between split windows
pull-down menu system and QuickStroke shortcuts
dynamic display function key labels with [Shift] [Ctrl] and [Alt] keys
user-definable keystroke macros that allow you to replace a series of commonly
used keystrokes with a single keystroke
undo up to 65,535 operations and then redo the last undo
line, stream, and columnar block operations, including inter-window copy,
move, and cut-and-paste capability
search and replace multi-file search across directories or files
DOS shell and DOS directory shell with multi-directory display
Hypertext help that provides a context-sensitive on-line help system, available
at all times
automatic extension that allows specific default setups for editing, translating,
and compiling
language support (auto-indent, construct matching) for BASIC
1 Publication 1746-PM001A-US-P
1-2 Installing the Software
linedraw facility that lets you program graphic screens that translate into
BASIC and can be executed from the module
simple text formatting features including intelligent word wrap and reformat,
indent and outdent
mouse support to speed menu selections
pop-up programmer’s calculator with hex, decimal, octal and binary
operations, a simulated printing tape, and the ability to paste the result into a program
pop-up ASCII table with hexadecimal and decimal equivalents
full EMS support where large files may be edited completely in EMS memory
swap out memory to EMS memory or disk when running other programs or
large compiles
user menus that you can create for rapidly selecting your most frequently
edited files, or for selecting frequently used programs installed in your personal computer
user-configurable default switch set-ups for search and replace, and multi-file
search functions

Hardware Requirements

multiple default directories based on file extensions (.bas files in one directory;
.bdl files in another)
The BASIC Development Software requires an MS-DOS compatible personal computer with at least 640K byte available RAM installed and at least 2M byte of available disk space on the hard drive. Your personal computer must be operating with a DOS version between 3.1 and 6.22.
Your BASIC Development Software supports almost all video cards and video modes. EGA 43 line and VGA 50 line modes are built in. Other video modes can be configured using the command line. Refer to Chapter 3 for additional information on configuring video modes.
The software supports Microsoft, MOUSE SYSTEMS, LOGITECH or any compatible mouse. It also supports the Expanded Memory Specification 4.0 and above.
Hardware for Interfacing Your Personal Computer with the BASIC or BASIC-T Module
Publication 1746-PM001A-US-P
A minimum of one communication port must be available on your personal computer. You need one of the following combinations of accessories to interface your personal computer with the module.
Installing the Software 1-3
To interface the communication port (COM1 or COM2) on your personal computer with port DH485 on the module, use an Allen-Bradley 1747-PIC Interface/Converter:
for direct connection to port DH485 on the module
plus an Allen-Bradley 1747-AIC Isolated Link Coupler to interface your
personal computer with a DH485 network on which the module resides
To interface the communication port (COM1 through COM8) on your personal computer with the port PRT1 on the module, use a 9-pin female to 25-pin male for the 1771-DB/B null modem cable or a 9-pin female to 9-pin female D-shell for the 1746-BAS or 1746-BAS-T null modem cable.
To communicate with the module without using one of the communication ports on your personal computer, use an Allen-Bradley 1784-KR DH485 Interface Card and 1747-AIC Link Coupler for direct connection to port DH485 on the module.
For cable details and jumper settings associated with these different configurations, refer to the SLC 500 BASIC and BASIC-T User Manual (publication number 1746-UM004A-US-P).
You should have two 3.5 inch disks or three 5.25 inch disks.
Table 1.1 Disk Contents
Disk
Number
Contents
3.5 inch disks
1 INSTALL.EXE IDENTIFY.TXT
MACROS.EXE HELP.EXE
2 IDENTIFY.TXT BASICEX.EXE
TRANS.EXE MISC.EXE
3 none IDENTIFY.TXT BASICEX.EXE
Contents
5.25 inch disks
INSTALL.EXE IDENTIFY.TXT HELP.EXE
IDENTIFY.TXT MACROS.EXE
TRANS.EXE MISC.EXE
Installation Procedure
Before installing your BASIC Development Software, the autoexec.bat file in your personal computer should be modified to include the \ABBASIC\BDS directory in its path command. This allows the BASIC Development Software to be initiated from any directory in the hard disk.
Use some form of file editing (most DOS systems come with an editing program called EDLIN) to add this statement to the path line in the autoexec.bat file on your personal computer. You may need to refer to the DOS manual for your personal computer for detailed information on structuring and editing this file. An example of a typical path statement with this directory added would be as follows:
PATH=C:\;C:\DOS;C:\MOUSE;C:\ABBASIC\BDS;
Publication 1746-PM001A-US-P
1-4 Installing the Software
IMPORTANT
When modifying your path command in the autoexec.bat file,
not
remove any other directories from the existing path. Add
C:\ABBASIC\BDS; to the end of the current path line. This
do
assumes you are installing your BASIC Development Software on the hard drive called C:. If you are installing on a different hard drive, substitute the letter of that drive for the C: above.
Check your config.sys file to be sure it establishes a minimum of 20 files and 20 buffers. In most DOS systems, this file can be read by typing
TYPE CONFIG.SYS. If
necessary, edit this file to include the lines:
FILES=20 BUFFERS=20
IMPORTANT
The number of files and buffers required is a minimum of 20. If the current number is greater than 20, do not reduce this number to 20. Doing so may cause some other software installed on your personal computer to become inoperable.
An automated installation program is provided to ease installation. The installation program automatically creates sub-directories and copies files from the disks to the hard disk.
IMPORTANT
The installation procedure may be aborted at any time by pressing and holding the [Ctrl] key and then pressing [c]. This
leaves the installation incomplete and the software inoperable.
To run the installation program:
1. Insert Disk 1 into the disk drive.
2. Type:
IMPORTANT
I
A:INSTALL and press [Enter].
Substitute the letter of the drive you are using, if it is not drive A.
Follow the instructions displayed.
Two megabytes of free disk space is required to install this software. If you choose a drive with less than that amount of available memory, the following message is displayed:
There is not enough room on you disk drive. The minimum number of free bytes must be 2000000.
WARNING: Software was not properly installed. C:\>
Publication 1746-PM001A-US-P
This indicates that the installation procedure has been aborted. If you still wish to use this drive, you must free some space by deleting any unnecessary files you have on that disk and then try the installation again.
Installing the Software 1-5
You may also choose a different drive. If the drive you choose has sufficient memory, the installation procedure continues. You are prompted to approve or alter the directory in which the software is to be installed:
Specify main directory in which to install files. C:\ABBASIC
Press [Enter] to accept the directory name or type a new directory name and press
[Enter].
IMPORTANT
If you alter a directory or sub-directory name, be sure to change the autoexec.bat file appropriately, as described in the beginning of the installation procedure section.
When you are finished loading the disks, you are reminded to modify your config.sys and autoexec.bat files as described in the previous section.
Directory Structure
The default directory structure after installation is as follows:
\ABBASIC – main directory
\ABBASIC\BAS – sub-directory to store the user BASIC source programs.
This is your working directory.
\ABBASIC\BDS – sub-directory that stores the BASIC Development Software
files
\ABBASIC\BDS\HELP – sub-directory that stores the help files
Change to your working directory before invoking PBASE. Additional working directories can be created anywhere on your hard disk.
You can change the sub-directory names after the installation process if the default names are not acceptable. The HELP sub-directory must reside directly under the BDS sub-directory or its equivalent. Do not rename the HELP sub-directory.
IMPORTANT
If you alter a directory or sub-directory name, be sure to change the autoexec.bat file appropriately, as described in the beginning of the installation procedure section.
Rockwell Automation grants you a license to install and use this software on a single personal computer, and to make one copy for backup purposes only. You are not licensed to install this software on more than one personal computer or to distribute it in any way. See the outside of the software package for licensing information.
Publication 1746-PM001A-US-P
1-6 Installing the Software

Backing-up Your Software

ATTENTION
!
You need as many blank, double-sided, double density disks for backup as you received for the original software installation (two-3.5 inch or three 5.25 inch disks).
Your blank disks need not be formatted. Refer to your DOS manual for more information.
This software is protected under the copyright laws of the United States. Unauthorized reproduction of copyrighted software violates U.S. copyright laws. Criminal penalties may include fines or imprisonment.
Publication 1746-PM001A-US-P
Chapter
2

Getting Familiar with Your Development Software

This chapter is intended to give you an overview of the BASIC development software so that you can understand the software’s general structure. The topics in this chapter include:

Starting Your Software

software start-up
toplevel menu
main menu
program editing and exiting
After installation, follow these steps to start your software.
1. Reboot your personal computer. This is necessary to activate any changes made to the autoexec.bat and config.sys files.
2.
2. If your mouse driver is not automatically installed by your autoexec.bat file,
2.2. execute whatever command is necessary to install it prior to starting the BASIC development software.
3.
3. Change to your working directory. If you accepted the default directory
3.3. assignments during software installation (refer to Chapter 1), the BAS subdirectory was created for use as a working directory. To change to this directory, type:
[Enter] or [Return] key (indicated throughout this manual by [Enter]).
The > moves to the end of the line:
4.
4. Type: > PBASE at the DOS prompt and press [Enter]. The software
4.4. determines your monitor type and displays the Toplevel menu.
> CD\ABBASIC\BAS at the DOS prompt and press the
CD\ABBASIC\BAS.
IMPORTANT
If you have a mouse and it is not working, you can still proceed by using the arrow keys. You may want to go back and check to make sure your mouse driver was installed either through the autoexec.bat file or through commands you entered.
IMPORTANT
1 Publication 1746-PM001A-US-P
If your personal computer does not recognize the command PBASE, the path command in your autoexec.bat file may not have been modified correctly.
There are additional mouse setup options listed in the Setup and Configuration menu. These include a mouse ON/OFF option. Refer to Chapter 3 for additional information on the Setup and Configuration menu.
2-2 Getting Familiar with Your Development Software

Toplevel Menu

The Toplevel menu allows you to create and edit your BASIC program.
Table 2.1 Toplevel Menu Selections
Selection Description
Select a project file
Edit mode allows you to enter Edit mode and open a new file window or enter the
Translate/compile allows you to immediately translate/compile a selected file, provided you
teRminal [232] switches your personal computer to Terminal mode so you can establish
User-defined program
Configuration menu
shell to DOS temporarily exits the BASIC development software and takes you back to
Quit exit your PBASE software and return to DOS
allows you to select a project file through your own custom menu. Selecting a project file is also available from the Other menu, and is described in Chapter 5.
presently active window. All main menu functions are available in this mode.
have correctly set up the filename extension and compiler program. Translate/compile is also available from the Other menu and is described in Chapter 8.
communications with the BASIC or BASIC-T module or other port device you have configured. Terminal mode is also available from the Other menu and is described in Chapter 9.
allows you to temporarily leave the BASIC development software and execute a program at the DOS level of your personal computer. Select the program from a menu that you have created. User Defined Program is also available from the Other menu and is described in Chapter 5.
displays a menu of set up features for mouse, display, printer, editing, etc. Chapter 3 describes this menu.
DOS where you can run programs or execute DOS commands. You can return by typing exit at the DOS prompt. Shell to DOS is also available from the Other menu.

Main Menu

Publication 1746-PM001A-US-P
The Main menu appears once you enter Edit mode through the Toplevel menu.
1. From the Toplevel menu, move the cursor or the mouse to select the Edit
mode option. You can also type in [E] since that is the highlighted letter on
this menu item.
2.
2. If cursoring, press
2.2. click the left mouse button when the mouse cursor is positioned over
mode
option.
[Enter] after highlighting Edit mode. If using a mouse,
Edit
The Main menu screen appears as shown below. You are now in Edit mode and can write or edit a program.
Near the top left of the Main menu is the letter
?No-File?. These are labels for the current window, which opened when you
A; and near the top right is
selected Edit mode. They tell you that you are looking at window A, which contains no file at this time.
Figure 2.1 Window A
Getting Familiar with Your Development Software 2-3
Status Line
Message Line
Labels for Current Window
Function Keys
L:3 C:1 1747-PBASE V X.XX [Text Edit] ↑ Ins 175k 06-12-91 1:15pm
File Window Block cUrsor Search Text Layout Print Macro Config Other Exit
+=+A+========================================================??No-File??+====+ |>> EOF << | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +----------------------------------------------------------------------------+ 1Help 2Menu 3Term 4Indent 5Save 6Search 7MarkBl 8BasHlp 9CopyBl 0MoveBl
Status Line
The status line is the first line at the top of the Main menu screen. Following is a description of the status line in the previous figure:
Table 2.2 Status Line Indicators
Indication Description
L:3 C:1 1747-PBASE [TEXT EDIT]
R does not appear in this example, but would appear if you were creating
indicates that the
Ins
175K
06-12-91 1:15pm
indicates that your cursor is in the third line of the active window indicates that your cursor is in the first column of the active window indicates that you are working with the BASIC development software indicates that you are in Text Editing mode
a keystroke macro (described in Chapter 4) to indicate when you are recording
[caps lock] key on your keyboard is on.
toggles between this and Or to indicate whether you are in Insert or Overstrike mode of text editing.
indicates the amount of currently available RAM memory for your personal computer
the current date from your personal computer’s clock the current time from your personal computer’s clock
Publication 1746-PM001A-US-P
2-4 Getting Familiar with Your Development Software
Message Line
The message line is the third line on the main menu screen, just below the pull-down menus. The software displays normal operating messages, instructions, or error messages on this line as dictated by your selections and actions.
Function Keys
The function keys are listed along the bottom of the screen (1 through 10).
For additional function keys press and hold the keys prior to pressing the function keys. For example, press cursor up to the main menu. Press active window. Press
[Alt-F2] to bring up the calculator. Press [Ctrl-F2] to
[Shift-F2] to print the date and time in the
[Shift], the [Alt] or the [Ctrl]
[F2] to move your
move to the next error if an error file was loaded for examination.
The function key menu changes as you select different menus, or after you select a specific function key. This way, the most commonly used features can be accessed by pressing a function key. For example, pressing
[F8] to bring up help on the
module causes a new function key menu to appear.
Using Help Outside a Program
1. Press [F1], or click the left mouse button when the cursor is on 1 Help at the
bottom left corner of the screen. Help is context-sensitive, meaning that a help screen appropriate for the current subject appears. If you are not working on any specific subject at the time,
CONTENTS appears.
2.
2. Move the cursor or arrow keys to
2.2.
[Enter] or the left mouse button. You should now be looking at 1747–PBASE QUICK REFERENCE. Help screens may range from a couple sentences to several
paragraphs.
1747-PBASE REFERENCE GUIDE - TABLE OF
B. Editor Quick Reference and press
Publication 1746-PM001A-US-P
3.
3. Scroll through this help screen by using the up/down, right/left cursor (arrow)
3.3. keys or the page-up/page-down keys. To the far right of the help screen is a column with arrows at the top and bottom. Place your mouse cursor on the upper or lower arrow, and click the left mouse button to scroll through the help screen. Notice that many of the help screens include words or items that are highlighted (or in a different color if you have a color monitor). These items are related topics for which additional help information is available.
4.
4. Place the cursor on
4.4. button. The help screen for
goto Line number and press [Enter] or the left mouse
goto Line number appears with more related
topics you can select from this screen.
Getting Familiar with Your Development Software 2-5
5.
5. Press the [Backspace] key or move the mouse cursor to Back–
5.5.
track<BackSpace> and click the left mouse button. This steps you back
through the help screens you have accessed and eventually brings you back to
1747-PBASE REFERENCE GUIDE - TABLE OF CONTENTS. From there you can
select other topics that may be of benefit. There is also a comprehensive Help Index that can be selected.
6.
6. Press the
6.6.
[ESC] key or move the mouse cursor to Done<ESC> and click the left
mouse button to exit any help screen at any time. The main menu screen reappears.
Using Help Within a Program
1. Type a command such as GOTO after the main menu screen reappears. (GOTO
has an entire section of Hypertext help available.)
2.
2. Press
2.2.
3.
3. Press the
3.3.
4.
4. Move the cursor up or down so that it is no longer on the same line as the GOTO
4.4.
5.
5. Press
5.5.
6.
6. Press the
6.6.
[F8] or move the mouse cursor to 8 BasHlp at the bottom of the screen
to bring up help on the module and BASIC language.
[ESC] key or move the mouse cursor to Done<ESC> and click the left
mouse button to exit help on
GOTO.
statement.
[F8] or move the mouse cursor to 8 BasHlp and click the left mouse
button. If you are not on a word, the
TABLE OF CONTENTS
appears. From this table of contents, you can access a
BASIC Language Reference Manual -
broad range of help screens on the modules, including hardware setup, and programming information.
[ESC] key or move the mouse cursor to Done<ESC> and click the left
mouse button to exit help. The main menu reappears.
Typical Pull-down Menu
PBASE uses a pull-down menu to allow access to the options you need.
For example, the File menu is available once you enter Edit mode through the Top le v e l me nu .
Path: Toplevel menu →→→ Edit mode →→→→ File QuickStroke: available for individual items within the File menu
If using a mouse, move the cursor over to the File menu at the top left and click the left mouse button to pull-down the File menu. If you do not have a mouse, press
[F2] on your keyboard to get you up to the pull-down menus. Cursor to the right
or left to highlight
File and press [Enter]. The FILE dialog box appears:
Publication 1746-PM001A-US-P
2-6 Getting Familiar with Your Development Software
Figure 2.2 File Dialog Box
L:3 C:1 1747-PBASE V x.xx [Text Edit] Ins 175k 06-12-91 1:15pm File Window Block cUrsor Search Text Layout Print Macro Config Other Exit +------------------FILE-------------------+ |Edit new file... |Load file into current window... <ShftF5>| |Save file in current window | | |save file As... <F5> | |Information about current file... | | |-----------------------------------------| |Merge file from disk... | | |(save Block to disk... ) | | |-----------------------------------------| | |DOS directory shell <CtrlF4>| | |Quit <AltX> | | +---------------Cancel<ESC>---------------+ | | | | | | | | | | | | |
1 Help 2 3 4 5 6 7 8 9 0
| |
|
=========================?No-File?=+
|
|
The FILE dialog box lists all the available options. Use your up and down arrow keys to move to the option you want. Press wish to leave the dialog box without selecting anything, press
[Enter] to select your option. If you
Cancel <ESC>.
Some of the options have a QuickStroke assignment listed on the right. For example, pressing
[Shift F5] instead of pulling down the File menu would load a
file into the current window.
Navigating Within Windows
Windows are labeled alphabetically in their top left corner. Your BASIC Development Software can open up to 100 windows simultaneously. Each may contain a separate file, or they can be linked together and contain different parts of the same large file. You can open and close these windows independently of each other.
The following screen shows an example with 3 windows opened simultaneously. Window A contains a file called BASE#1 while windows B and C both contain a file called BASE#2. In this case, B and C are linked together; you are actually looking at different parts of the same file.
Publication 1746-PM001A-US-P
Figure 2.3 Window Labels
L:3 C:1 1747-PBASE V x.xx [Text Edit] Ins 175k 06-12-91 1:15pm File Window Block Cursor Search Text Layout Print Macro Config Other Exit
+=+A+=======D:\ABBASIC\BAS\BASE#1=+ | | +=+B+= =======D:\ABBASIC\BAS\BASE#2===+ |100 (this is BASE #1) | |100 (this is BASE #2) | |110 for x = 1 to 100 | |110 for x = 1 to 50 | |120 a = x * 2 | |120 a = x * 2 + 5 | |130 if a = 60 then 180 | |130 if a = 70 then 180 | |140 next x | |140 next x | |150 goto 200 | |150 goto 190 | |180 print "a = 60" | |180 print "a = 70" | |200 end | | | |>> EOF << | +=+C+= =========D:\ABBASIC\BAS\BASE#2==+« | | |550 for x = 1 to 100 | | | |560 a = x * 2 | | | |570 if a = 60 then 600 | | | |580 next x | | | |590 goto 700 | | | |600 print "a = 60" | | | |700 end (end of BASE #2) | | | |>> EOF << | | | | | +----------------------------------------------------------------------------+
1 Help 2Menu 3Term 4Indent 5Save 6Search 7MarkBl 8BasHlp 9CopyBl 0MoveBl
Getting Familiar with Your Development Software 2-7
ε
A more complete explanation of the options available through the Window menu is in Chapter 4. At this point, we simply want you to understand the concept behind the windows feature. To accomplish that, make a few adjustments to the current window:
1. If using a mouse, move the cursor over to the Window menu (near the top left)
and click the left mouse button. If you do not have a mouse, press
[F2] on
your keyboard to access the pull-down menus. Cursor to the right or left to highlight the Window menu and press
[Enter].
Publication 1746-PM001A-US-P
2-8 Getting Familiar with Your Development Software
Figure 2.4 Adjusting the Current Window
L:3 C:1 1747-PBASE V x.xx [Text Edit] Ins 175k 06-12-91 1:15pm File Window Block cUrsor Search Text Layout Print Macro Config Other Exit
+----------WINDOW----------+ +=+A+|Open | |Close | | | |Split | | | |List... <AltF1> | | | | | |Next <ShftF1> | | | |Previous <CtrlF1> | | | |(Adjacent <AltW>) | | | | | |Hide | | | |Modify size <ScrollLockOn>| | | |Zoom <CtrlF3> | | | |mInimize | | | | | |linK... | | | |(Unlink) | | | +--------Cancel<ESC>-------+ | | | | |
+--------------------------------------------------------------------------------+ 1 Help 2 3 4 5 6 7 8 9 0
--------------------------
--------------------------
--------------------------
|=====================C:\ABBASIC\BAS\FIRST.BDL==+
| |
| |
| |
2.
2. Cursor down, or move your mouse to select Modify size on the Window
2.2. menu. When it is highlighted, press
[Enter] or click the left mouse button.
The border of the A window changes to highlighted (or a different color), indicating it is ready to have its size or position modified. Instructions appear on the message line directly above the A window.
3.
3. Press and hold
3.3. If you let go of
[Shift] and [left arrow]. The A window shrinks to the left.
[left arrow] and press [up arrow], the screen shrinks
upwards.
4.
4. Let go of
4.4.
[Shift], and press [right arrow]. You are now positioning the A
window.
5.
5. Press
5.5.
[ESC] when you are finished adjusting the size and shape of the A
window.
6.
6. Pull down the Window menu again. Cursor down to select
6.6. Window menu.
Zoom causes the A window to return to full size.
Zoom on the
Publication 1746-PM001A-US-P
Getting Familiar with Your Development Software 2-9

Editing a BASIC Program

The BASIC Development Language (BDL) streamlines BASIC programming by providing a number of screen editing features, open-format line entry, and macros. Macros are commands that represent a more complex series of BASIC commands.
After you finish writing your program in the BASIC development language, you must translate/compile it into the BASIC language that the BASIC or BASIC-T module understands. This creates a BAS file, which you can then download to the module.
Translating and downloading are described in the following sections and in Chapters 8 and 9.
General Editing
In the last section you positioned and sized the A window. Now you edit a BASIC program.
1. If using a mouse, move the cursor over to the File menu at the top left and click
the left mouse button to pull down the File menu. If you do not have a mouse,
[F2] on your keyboard to move the cursor to the pull-down menus.
press Cursor to the right or left to highlight
2.
2. Cursor down, or move your mouse to select
2.2. When it is highlighted, press could have pressed
A since it is the highlighted letter corresponding to this
[Enter] or click the left mouse button. You also
menu item.
File and press [Enter].
save file As on the File menu.
The
SAVE FILE AS dialog box appears on the screen. On the first line, it
indicates that the file in the current window is named
3.
3. Type:
3.3.
4.
4. Press [Enter] or move the mouse cursor to OK<ENTER>, and click the left
4.4.
FIRST.BDL
?No-File?.
mouse button.
The
SAVE FILE AS dialog box disappears and
“C:\ABBASIC\BAS\FIRST.BDL Saved” appears in the message line (third line
from the top). Your message will be different if your software is not installed on the C: drive, or if you are using different directory names.
You have just saved a file containing the
FIRST with the file extension of BDL. BDL stands for BASIC development
GOTO statement under the name
language, and entering the file extension .BDL enables the software to identify the correct compiler for translating your program into the BASIC language. Filename extensions are described in Chapter 3.
Publication 1746-PM001A-US-P
2-10 Getting Familiar with Your Development Software
5.
5. Use the previously saved program:
5.5.
FIRST.BDL
6.
6. Move the cursor to the top left corner of the window.
6.6.
7.
7. Type in the following program:
7.7.
{THIS IS A FIRST PROGRAM} REM FIRST PROGRAM FOR X=1 TO 100
A=X*2 PRINT A NEXT X
END
Notice that there are no line numbers entered here. Also notice that when you type in the lines within the for/next loop, they are indented. This is because the BASIC development software recognizes that you are entering a BASIC development language program (since your filename extension is BDL) and the default parameters are set for smart indenting. There are a number of other related parameters for BDL files discussed in Chapter 3.
Saving Your Program
Path: Edit mode →→→ File →→→→ save file as Path: Edit mode →→→ File →→→→ save file as →→→→ save file in current window QuickStroke: [F5]
We recommend that you periodically save sizeable programs as you work on them to avoid losing large quantities of work in the event of a system error or power failure.
The BASIC development software has an autosave feature that offers two methods for automatically saving files as you work on them. It also has a backup feature with several methods for making backup files. These features are described in Chapter 3.
1. If using a mouse, move the cursor over to the File menu at the top left and click the left mouse button. If you do not have a mouse, press [ cursor to the pull-down menus. Cursor to the right or left to highlight the File menu and press
2.
2. Move the cursor to
2.2.
[Enter].
Save file in current window and press [RETURN] or
click the left mouse button.
Since you have previously named and saved the file in the current window and selected
Save file in current window, the software assumes you are saving
it under its existing name. A message appears in the message line indicating that the save was completed.
F2] to move the
Publication 1746-PM001A-US-P
Loading...
+ 114 hidden pages