BASIC Development Software(Catalog Numbers 1747-PBASE)Programming Manual
Publication 1746-PM001A-US-P P-2Purpose of this ManualThis manual is a programming guide when using the BASIC Development Software, 1747-PBASE
Publication 1746-PM001A-US-P8-6 Translating Your ProgramThe following table lists the translator configuration options available through the CO
1 Publication 1746-PM001A-US-PChapter 9Communicating with the ModuleAfter your application file has been translated into an understandable format for
Publication 1746-PM001A-US-P9-2 Communicating with the ModuleThe following table shows the BASIC commands that are executable on your module fr
Publication 1746-PM001A-US-PCommunicating with the Module 9-3Downloading FileAfter you have created and translated your program, your next step
Publication 1746-PM001A-US-P9-4 Communicating with the Module2. Enter the path, filename, and file extension of the file to be downloaded. Ente
Publication 1746-PM001A-US-PCommunicating with the Module 9-5Figure 9.2 File to Upload Screen2. Enter the path, filename, and file extension th
Publication 1746-PM001A-US-P9-6 Communicating with the Module3. Once the filename has been keyed in or selected from the directory screen, begi
Publication 1746-PM001A-US-PCommunicating with the Module 9-74. If your module has the 1747-M1 memory module installed, type 9FFFH for the endi
Publication 1746-PM001A-US-P9-8 Communicating with the ModuleYou can use any PROM programmer that:• interfaces to your personal computer• sup
Publication 1746-PM001A-US-PCommunicating with the Module 9-9Restoring the Module ImageRestoring the module image enables you to completely res
Publication 1746-PM001A-US-P P-3Related DocumentationThe following documents contain additional information regarding Rockwell Automation produ
Publication 1746-PM001A-US-P9-10 Communicating with the ModuleNot having a .MAP file may make debugging your original source code more difficul
Publication 1746-PM001A-US-PCommunicating with the Module 9-11Debugging ExampleThe following example program will be used to illustrate the deb
Publication 1746-PM001A-US-P9-12 Communicating with the ModuleFigure 9.3 Watch Window6. Press [F1] to bring up help on the BASIC Debugger, [Esc
Publication 1746-PM001A-US-PCommunicating with the Module 9-1314. Move the cursor down to anywhere on the line next x and then press [F4]. This
Publication 1746-PM001A-US-P9-14 Communicating with the ModuleMaking Corrections to Your ProgramThe normal sequence in writing programs using t
Publication 1746-PM001A-US-PCommunicating with the Module 9-15Figure 9.4 RS-232 Terminal Setup MenuAutobaudThis menu selection automatically fi
Publication 1746-PM001A-US-P9-16 Communicating with the ModuleGeneral Setup ParametersThis menu selection prompts you with a dialog box that gi
Publication 1746-PM001A-US-PCommunicating with the Module 9-17The following parameters are available:• active Com port allows you to select
Publication 1746-PM001A-US-P9-18 Communicating with the ModuleDH485 Communications SetupBefore configuring terminal communication parameters, t
Publication 1746-PM001A-US-PCommunicating with the Module 9-19General Setup ParametersThis menu selection prompts you with a dialog box that gi
Publication 1746-PM001A-US-P P-4Terms and AbbreviationsThe following terms and abbreviations are specific to this product. For a complete list
Publication 1746-PM001A-US-P9-20 Communicating with the ModuleCom Port SettingsThis menu selection brings up the PORT SETUP dialog box that all
Publication 1746-PM001A-US-PCommunicating with the Module 9-21Who ActiveThe Who Active screen allows you to see the active nodes on the DH485 n
Publication 1746-PM001A-US-P9-22 Communicating with the ModuleWho ListenThe Who Listen display shows the active nodes without placing the termi
1 Publication 1746-PM001A-US-PAppendix ABASIC Macro LibraryThis appendix contains important information you should be concerned with when using progra
Publication 1746-PM001A-US-PA-2 BASIC Macro LibraryScreen FunctionsThe following table describes the macro CALLs that you use to perform operat
Publication 1746-PM001A-US-PBASIC Macro Library A-3Keyboard FunctionsThe following table describes the macro CALLs that you use to perform keyb
Publication 1746-PM001A-US-PA-4 BASIC Macro LibrarySLC Backplane FunctionsThe following table describes the macro CALLs that you use to communi
Publication 1746-PM001A-US-PBASIC Macro Library A-5Clock FunctionsThe following table describes the macro CALLs that you use to set and read th
Publication 1746-PM001A-US-PA-6 BASIC Macro LibraryBattery Back-UpThe following table describes the macro CALLs used to control the battery bac
Publication 1746-PM001A-US-PBASIC Macro Library A-7String RoutinesThe following table describes the macro CALLs used for string routines. Table
Publication 1746-PM001A-US-P P-5Conventions Used in this ManualThe following conventions are used throughout this manual:• Bulleted lists such
Publication 1746-PM001A-US-PA-8 BASIC Macro Library[CTRL-C] FunctionsThe following table describes the macro CALLs used for [Ctrl-C] functions.
Publication 1746-PM001A-US-PBASIC Macro Library A-91771-DB/B Backplane FunctionsThe file INCLUDBB.BDL comes as part of the BASIC Development so
Publication 1746-PM001A-US-PA-10 BASIC Macro Libraryplc_bcd_6_to_db(%1,%2) Converts the number from PLC 6-Digit, Signed, Fixed Decimal BCD +/-
1 Publication 1746-PM001A-US-PAppendix BThe DOS Directory ShellThis appendix supplements specific information about the DOS directory shell contained
Publication 1746-PM001A-US-PB-2 The DOS Directory Shell DOS Directory Shell OperationYou can access the DOS directory shell two ways. From the
Publication 1746-PM001A-US-PThe DOS Directory Shell B-3Once the initial screen is displayed, a highlight bar appears at the top and allows you
Publication 1746-PM001A-US-PB-4 The DOS Directory ShellFile Operations from the DOS Directory ShellIndividual files can be copied, deleted, ren
Publication 1746-PM001A-US-PIndexNumerics1747-AIC Isolated Link Coupler 1-21747-PBASE Translator 8-11747-PIC Interface/Convertor 1-2Aabbreviations and
Publication 1746-PM001A-US-P2 Indexconfiguring softwareautosave 3-12backup files 3-12default filename extensions 3-8display options 3-7edit opt
Publication 1746-PM001A-US-PIndex 3filesautosave 3-12backup 3-12downloading 9-3hex 9-6loading 52merging 52saving 52selecting project 52temporar
Publication 1746-PM001A-US-P P-6Your Questions or Comments on this ManualIf you find a problem with this manual, please notify us of it on the
Publication 1746-PM001A-US-P4 Indexmenusblock 4-3cursor 4-15file 51macro 4-11main 2-2other 4-8print 7-1search 4-2setup and configuration 3-1top
Publication 1746-PM001A-US-PIndex 5RS-232autobaud 9-15com port settings 9-16communications setup 9-14general setup parameters 9-16Ssavingconfig
Publication 1746-PM001A-US-P6 IndexWWHO ACTIVE 9-21WHO LISTEN 9-22windowlabels 2-7window menu 2-6, 4-10windows 1-1, 2-6, 4-9writing programs 6-
Publication 1746-PM001A-US-P - May 2000 7 40072-096-01(A)Supercedes Publication 1746-6.2 - November 1994 © 2000 Rockwell International Corporation. P
1 Publication 1746-PM001A-US-PChapter 1Installing the SoftwareThis chapter begins with a general description of your BASIC Development Software and th
Publication 1746-PM001A-US-P1-2 Installing the Software• linedraw facility that lets you program graphic screens that translate into BASIC and
Publication 1746-PM001A-US-PInstalling the Software 1-3To interface the communication port (COM1 or COM2) on your personal computer with port D
Publication 1746-PM001A-US-P1-4 Installing the SoftwareCheck your config.sys file to be sure it establishes a minimum of 20 files and 20 buffer
Publication 1746-PM001A-US-PInstalling the Software 1-5You may also choose a different drive. If the drive you choose has sufficient memory, th
Important User InformationBecause of the variety of uses for the products described in this publication, those responsible for the application and use
Publication 1746-PM001A-US-P1-6 Installing the SoftwareBacking-up Your SoftwareYou need as many blank, double-sided, double density disks for b
1 Publication 1746-PM001A-US-PChapter 2Getting Familiar with Your Development SoftwareThis chapter is intended to give you an overview of the BASIC de
Publication 1746-PM001A-US-P2-2 Getting Familiar with Your Development SoftwareToplevel MenuThe Toplevel menu allows you to create and edit you
Publication 1746-PM001A-US-PGetting Familiar with Your Development Software 2-3Figure 2.1 Window AStatus LineThe status line is the first line
Publication 1746-PM001A-US-P2-4 Getting Familiar with Your Development SoftwareMessage LineThe message line is the third line on the main menu
Publication 1746-PM001A-US-PGetting Familiar with Your Development Software 2-55.5.5.5. Press the [Backspace] key or move the mouse cursor to B
Publication 1746-PM001A-US-P2-6 Getting Familiar with Your Development SoftwareFigure 2.2 File Dialog BoxThe FILE dialog box lists all the avai
Publication 1746-PM001A-US-PGetting Familiar with Your Development Software 2-7Figure 2.3 Window LabelsA more complete explanation of the optio
Publication 1746-PM001A-US-P2-8 Getting Familiar with Your Development SoftwareFigure 2.4 Adjusting the Current Window2.2.2.2. Cursor down, or
Publication 1746-PM001A-US-PGetting Familiar with Your Development Software 2-9Editing a BASIC ProgramThe BASIC Development Language (BDL) stre
i Publication 1746-PM001A-US-PTable of ContentsPrefaceWho Should Use This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P-1Purpo
Publication 1746-PM001A-US-P2-10 Getting Familiar with Your Development Software5.5.5.5. Use the previously saved program:FIRST.BDL6.6.6.6. Mov
Publication 1746-PM001A-US-PGetting Familiar with Your Development Software 2-11Translating Your ProgramPath: Toplevel menu →→→→ Translate/comp
Publication 1746-PM001A-US-P2-12 Getting Familiar with Your Development SoftwareChanging to Terminal ModePath: Toplevel menu →→→→ teRminal [232
Publication 1746-PM001A-US-PGetting Familiar with Your Development Software 2-13Downloading Your ProgramPath: Toplevel menu →→→→ teRminal [232]
Publication 1746-PM001A-US-P2-14 Getting Familiar with Your Development Software
1 Publication 1746-PM001A-US-PChapter 3Configuring Your SoftwareThis chapter describes how to configure your software. Major topics include:• edit opt
Publication 1746-PM001A-US-P3-2 Configuring Your SoftwareFigure 3.1 Configuration MenuCommand Line SwitchesThe BASIC Development Software allow
Publication 1746-PM001A-US-PConfiguring Your Software 3-3Table 3.1 Command Line SwitchesSwitch Equals Summary/MN Mouse disable The BASIC Develo
Publication 1746-PM001A-US-P3-4 Configuring Your SoftwareLoading Files from the Command LineFiles to be loaded may be specified on the command
Publication 1746-PM001A-US-PConfiguring Your Software 3-5Figure 3.2 Edit Settings Dialog BoxThe EDIT SETTINGS dialog box allows you to configur
Publication 1746-PM001A-US-PTable of Contents iiChapter 3Configuring Your SoftwareSetup and Configuration Menu . . . . . . . . . . . . . . . .
Publication 1746-PM001A-US-P3-6 Configuring Your SoftwareIn the example below, the delimiter string is [space] ? : . The cursor stops at each w
Publication 1746-PM001A-US-PConfiguring Your Software 3-7• Tab expand allows you to configure how 1747-PBASE handles tab characters and the [
Publication 1746-PM001A-US-P3-8 Configuring Your SoftwareConfiguring Your Filename ExtensionsPath: Toplevel Menu →→→→ Configuration menu →→→→ S
Publication 1746-PM001A-US-PConfiguring Your Software 3-9this file, the indents, tabs, margins, and word wraps are guided by these settings.Fig
Publication 1746-PM001A-US-P3-10 Configuring Your Software6. Move the cursor down by pressing [Tab] to highlight Compiler–Programsetup for the
Publication 1746-PM001A-US-PConfiguring Your Software 3-11Configuring Your Printer OptionsPath: Toplevel Menu →→→→ Configuration menu →→→→ Prin
Publication 1746-PM001A-US-P3-12 Configuring Your SoftwareBackup Files, Temporary Files, and AutosavePath: Toplevel Menu →→→→ Configuration men
Publication 1746-PM001A-US-PConfiguring Your Software 3-13Search and Replace DefaultsPath: Toplevel Menu →→→→ Configuration menu →→→→ Search an
Publication 1746-PM001A-US-P3-14 Configuring Your SoftwareSave Configuration and ExitPath: Toplevel Menu →→→→ Configuration menu →→→→ saVe conf
1 Publication 1746-PM001A-US-PChapter 4Editing a ProgramThis chapter is designed to help you understand the file editing features available with your
Publication 1746-PM001A-US-PTable of Contents iiiChapter 6Writing Programs Using the BASIC Development LanguageOverview of the Language . . . .
Publication 1746-PM001A-US-P4-2 Editing a ProgramAnother technique for moving through a program is to select a line number. You can select goto
Publication 1746-PM001A-US-PEditing a Program 4-3The Search menu is divided into two sections. The first section provides search options used t
Publication 1746-PM001A-US-P4-4 Editing a ProgramFigure 4.2 Block MenuBefore you can manipulate a block (copy, move, delete, etc.), you must fi
Publication 1746-PM001A-US-PEditing a Program 4-5Figure 4.3 Marking ExamplesOnce you have defined a block, you can perform the following action
Publication 1746-PM001A-US-P4-6 Editing a ProgramText Formatting, Undo, and RedoThe Text menu supports text entry and formatting with a number
Publication 1746-PM001A-US-PEditing a Program 4-7The following is a list of the options available from the text menu and a brief explanation of
Publication 1746-PM001A-US-P4-8 Editing a ProgramThe Other menu provides access to the first three of the advanced features described in this s
Publication 1746-PM001A-US-PEditing a Program 4-9Using the CalculatorPath: Toplevel Menu →→→→ Edit mode →→→→ Other →→→→ CalculatorQuickStroke:
Publication 1746-PM001A-US-P4-10 Editing a ProgramFigure 4.6 Window MenuThe best way to understand and become proficient at using the window fe
Publication 1746-PM001A-US-PEditing a Program 4-11Using Keystroke MacrosKeystroke macros allow you to record a series of key presses that accom
Publication 1746-PM001A-US-PTable of Contents ivChapter 9Communicating with the ModuleChanging to Terminal Mode . . . . . . . . . . . . . . .
Publication 1746-PM001A-US-P4-12 Editing a ProgramKeystroke macros make your work easier and faster by allowing you to cut down on repetitive a
Publication 1746-PM001A-US-PEditing a Program 4-135. Move the mouse cursor to the QuickStroke assignment field and click the left mouse button.
Publication 1746-PM001A-US-P4-14 Editing a ProgramThe whole process of splicing header information into any new file has now been reduced to on
Publication 1746-PM001A-US-PEditing a Program 4-15Valid QuickStroke Key AssignmentsYou can use any keystrokes that begin with [Alt] provided th
Publication 1746-PM001A-US-P4-16 Editing a ProgramFigure 4.8 Cursor MenuThe following table briefly describes the options available from the Cu
1 Publication 1746-PM001A-US-PChapter 5Manipulating FilesThe goal of this chapter is to familiarize you with the manipulation features of your BASIC D
Publication 1746-PM001A-US-P5-2 Manipulating FilesSelecting Project FilesThe Select a project file option creates a personalized menu of freque
Publication 1746-PM001A-US-PManipulating Files 5-3Figure 5.2 User MenuBehind the user menu is the A window and above it is the Main menu, indic
Publication 1746-PM001A-US-P5-4 Manipulating FilesTo load files into the User menu:1. Select the Create<Ins> option from the user menu.2.
Publication 1746-PM001A-US-PManipulating Files 5-5Programs are entered onto the User menu in a similar manner as the previous User menu, except
Publication 1746-PM001A-US-PTable of Contents vAppendix BThe DOS Directory ShellUsing the DOS Directory Shell. . . . . . . . . . . . . . . . .
Publication 1746-PM001A-US-P5-6 Manipulating FilesTo select the swap method:1. Highlight Swap method.2. Select the desired Swap method.After se
Publication 1746-PM001A-US-PManipulating Files 5-7Use COMMAND.COM OptionThe Use COMMAND.COM option allows you to use internal DOS commands like
Publication 1746-PM001A-US-P5-8 Manipulating Files
1 Publication 1746-PM001A-US-PChapter 6Writing Programs Using the BASIC Development LanguageThis chapter is designed to help you write programs using
Publication 1746-PM001A-US-P6-2 Writing Programs Using the BASIC Development LanguageThe initial statement {$I INCLUDE.BDL} is called a transla
Publication 1746-PM001A-US-PWriting Programs Using the BASIC Development Language 6-3Syntax:{ }Syntax: REMExample:Before translation: After tra
Publication 1746-PM001A-US-P6-4 Writing Programs Using the BASIC Development LanguageFor this example, we have included the file FIRST.BDL. Its
Publication 1746-PM001A-US-PWriting Programs Using the BASIC Development Language 6-5Syntax: {$L [labelname]}Example:Before translation: After
Publication 1746-PM001A-US-P6-6 Writing Programs Using the BASIC Development LanguageLine NumberThe Line Number directive allows you to specify
Publication 1746-PM001A-US-PWriting Programs Using the BASIC Development Language 6-7BreakpointThe Breakpoint directive inserts a STOP statemen
Publication 1746-PM001A-US-PTable of Contents vi
Publication 1746-PM001A-US-P6-8 Writing Programs Using the BASIC Development LanguageMacrosThere are three types of macros used with the BASIC
Publication 1746-PM001A-US-PWriting Programs Using the BASIC Development Language 6-9Example:A programming macro is written to set the wall clo
Publication 1746-PM001A-US-P6-10 Writing Programs Using the BASIC Development LanguageSubprogram CALL 70, CALL 71In a main program, the BASIC c
Publication 1746-PM001A-US-PWriting Programs Using the BASIC Development Language 6-11Creating a Second ProgramIn Chapter 2, you created a simp
Publication 1746-PM001A-US-P6-12 Writing Programs Using the BASIC Development Language7. Type the screen setup comment and the screen commands
Publication 1746-PM001A-US-PWriting Programs Using the BASIC Development Language 6-1314. Continue typing in the rest of the program as shown:h
Publication 1746-PM001A-US-P6-14 Writing Programs Using the BASIC Development LanguageFigure 6.1 Second Program, After Translation (SECOND.BAS)
Publication 1746-PM001A-US-PWriting Programs Using the BASIC Development Language 6-15DownloadingDownloading a file requires that you connect y
Publication 1746-PM001A-US-P6-16 Writing Programs Using the BASIC Development Language
1 Publication 1746-PM001A-US-PChapter 7Printing Your ProgramThis chapter describes how to set up a printer and print a program. Major topics include:•
P-1 Publication 1746-PM001A-US-P PrefaceRead this preface to familiarize yourself with the rest of the manual. This preface covers the following topic
Publication 1746-PM001A-US-P7-2 Printing Your ProgramPrinter SelectionThe BASIC Development Software has printer setup parameters already defin
Publication 1746-PM001A-US-PPrinting Your Program 7-3Following is a description of the parameters that you can create or modify on the PRINTER
Publication 1746-PM001A-US-P7-4 Printing Your ProgramSerial PrintersSome printers use serial communications, and some are equipped for both ser
Publication 1746-PM001A-US-PPrinting Your Program 7-5Using the Printer ControlsWe have already discussed printer setup; but before we actually
Publication 1746-PM001A-US-P7-6 Printing Your ProgramPrinting All or Part of a DocumentThe Print menu, accessed from the main menu, allows you
1 Publication 1746-PM001A-US-PChapter 8Translating Your ProgramWhen you have completed this chapter, you will know how to:• translate your program•
Publication 1746-PM001A-US-P8-2 Translating Your ProgramThe software checks the extension of the file in the active edit window and prompts you
Publication 1746-PM001A-US-PTranslating Your Program 8-3get_time (d1,m1,y1){setup for operator #1}goto acknowledge{$L op2setup}get_time (d2,m2,
Publication 1746-PM001A-US-P8-4 Translating Your Program390 CALL 46400 POP A410 P. A,”:”,420 POP A430 P. A,”:”,440 POP A450 P. A,” “,460 POP A4
Publication 1746-PM001A-US-PTranslating Your Program 8-5Figure 8.3 Compiler Program Setup Dialog BoxFile Window Block cUrsor Search Text Layout
Comentarios a estos manuales