Allen-Bradley Application Generator Software (Cat. No.
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) describes some important differences between solid state equipment and hard–wired electromechanical devices.
Table of Contents Application Generator User Manual Overview Chapter 1 What Is It? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What Does It Do? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Who Can Use It? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Does It Work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Table of Contents Application Generator User Manual Tables & Figures Table 1.A Summary of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 – 2 Figure 2.1 Application Generator Main Screen at Startup . . . . . . . . . . . . . . . . . . . . . 2 – 2 Figure 3.1 The Application Generator Main Screen and Main Operations Menu. . . . . 3 – 3 Figure 3.2 AG Display to Screen Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 4 Figure 3.
Table of Contents Application Generator User Manual AG Other Operations Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 15 Figure 3.17 AG Sound Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 15 Figure 3.18 AG On Condition Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 17 Figure 3.19 AG On Other Inputs Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 – 18 Figure 3.
Chapter 1 Overview Chapter 1 Overview This brief chapter provides an overview of the A-B VBASIC Applications Generator Software (Cat. No. 2708-NAG). The topics it covers include descriptions of: • • • • • What Is It? What it is What it does Who can use it How it works Contents of this manual The Application Generator (AG) is an interactive program development tool for Catalog No. 2708–DH5B2L and -DH5B4L products from Allen-Bradley Company.
Chapter 1 Overview Who Can Use It? An AG developer should have a good grasp of the problem to be solved, and be familiar with use of PC- based products. General programming skills may be beneficial, although they are not required. While AG substantially decreases development time, and improves overall program quality, it cannot duplicate the in-depth problem analysis, and insight available only from a human developer. How Does It Work? The simulation is controlled by the AG master program.
Chapter 1 Overview Conventions Used The following conventions are used in this manual: • All menus and screens reproduced in this manual are approximate renderings of what you will see on your terminal screen. Allen-Bradley reserves the right to make minor modifications to any menu or screen to help improve performance. • A symbol or word appearing in brackets represents a single key on the computer keyboard. For example: [ESC], [ENTER], or [BACKSPACE].
Chapter 2 Installing and Starting Application Generator Chapter 2 Installing and Starting Application Generator This chapter contains information which will help you prepare to use the AG software to develop new applications. It includes information on: • • • • System requirements Installation instructions Starting AG The default personality System Requirements AG requires an IBM PC or IBM PC compatible which has at least 512K of RAM, a hard disk, and DOS 3.2 or later.
Chapter 2 Installing and Starting Application Generator Figure 2.
Chapter 3 Using Application Generator Chapter 3 Using Application Generator This chapter provides a detailed summary of how you can use AG to generate your own custom applications. It includes: • • • • Keystroke Summary a concise summary of the keystrokes used by the program an explanation of variables as used in AG an explanation of each menu choice on the AG screens instructions for editing a program The following list provides a summary of the special keystroke functions recognized by AG.
Chapter 3 Using Application Generator Special Purpose Keys Variables [PAGE UP] Skip up 6 lines or change field size. [PAGE DOWN] Skip down 6 lines or change field size. [END] Move to the end of the program. [HOME] Undo or move to the start of the program. [ALT] I Set or clear the interrupt (breakpoint). [ALT] D Allows you to specify a device log file that will store I/O transactions. – Moves the current line to the edit buffer. + Copies the current line to the edit buffer.
Chapter 3 Using Application Generator Main Operations Menu The Main Operations Menu, like all AG menus, is located in the upper right of the screen. An explanation of the choices it presents appears below. Figure 3.1 The Application Generator Main Screen and Main Operations Menu. F1 – General Help The last two lines of the display contain ‘field specific’ help information at all times. Selecting F1 brings up the context sensitive help system.
Chapter 3 Using Application Generator When F2 is pressed the Main Operations Menu is replaced with the options shown in Figure 3.2. Figure 3.2 AG Display to Screen Menu In options F2, F3, and F7–F9, you are prompted to enter the text or the variable name. When you provide a name it is shown on the workstation display in the upper right corner of the CRT. You then use the arrow keys to position it, and the plus and minus keys to choose the size of the field.
Chapter 3 Using Application Generator F3 – Keyboard Read/Laser The Keyboard Read menu is used to read fields and characters from the keyboard. When you chose one of these attributes a message is displayed on the next to last line of the CRT. Then the attribute is added to the read statement in the program. When F3 is pressed the Main Operations Menu is replaced with these options: Figure 3.
Chapter 3 Using Application Generator The F4 – READ ALPHA creates a field which will allow entry of all displayable characters. The F5 – SPECIAL OPTIONS which can be selected for reading fields are: Figure 3.5 AG Field Attributes Menu AUTOEXIT: When the operator has entered as many characters as are in the field, then the read is completed. ‘Autoexit’ is added to the Keyboard read statement. DON’T CLEAR: Prevents the field from being cleared on the first character typed (see default).
Chapter 3 Using Application Generator When the F7 – SET AN INPUT RANGE/LOOKUP is entered the following sub-menu is displayed: Figure 3.6 AG Range Selection Menu Smallest #: You enter the lowest numeric number for the input value. For example, it can be entered as the number 20, or if the variable AGE = 20 then you can enter the variable name, AGE. Biggest #: You enter the biggest numeric number for the input value.
Chapter 3 Using Application Generator Lookup in workstation file: You enter the name of the Lookup File and the starting character position to compare. Figure 3.7 AG Lookup Options Menu Lookup in Host file: You enter the name of the Lookup File and the starting character position to compare. These lookups are performed by your host computer. Allen-Bradley Network Manager Software (Catalog No. 2708-NNM) V5.0 must be installed and running on your host computer in order for host lookups to work.
Chapter 3 Using Application Generator If the F8 – SET A TIMEOUT option is chosen, you are given the choice of setting the timeout from seconds to minutes. The following sub-menu is displayed: Figure 3.8 AG Timeout Selection Menu Timeouts are a way of stopping a read operation before the operation has finished. If your program is waiting for the user to enter his password and the user walks off and leaves the workstation, you want your program to restart after a given amount of time.
Chapter 3 Using Application Generator Figure 3.9 AG Read Laser/Device Menu In the options F2 through F6, you are prompted on the next to the last line: ‘Read into Variable Name : “. IN is the default variable. Press [ENTER] to store the operation. The F7 option is appended to the Read statement and replaces any previous timeout.
Chapter 3 Using Application Generator In the F3 – SEND VARIABLE DIRECTLY TO HOST (NET) option, a record can be sent only when the Host is online. If you send a record when the Host if offline then the next record cannot be sent until the Host comes online and receives the record. Use this option only when you know the Host is online. In the options F2 through F5, you are prompted on the next to the last line: “Variable to send to ... . ”. OUT is the default variable. Press [ENTER] to store the operation.
Chapter 3 Using Application Generator Figure 3.12 AG Move/Transfer/Add Menu These options are described below: MOVE: This is used to copy the contents of one variable to another, or to set a variable to a value or text string. To clear a variable set it to “ ”. APPEND: Appends a variable or text string onto the end of another. This is often used in building a record for sending to the host. ADD: This will convert the variable into a number and add a value.
Chapter 3 Using Application Generator Variables, text, date and time can be positioned within the variable (this is shown on the second to the last line of the display). The (+) and (–) will change the field size and format, while left and right arrows are used for positioning. Important: It is best to be in single step mode while entering transfers since that is the easiest way to see the relationship between fields that are being formatted.
Chapter 3 Using Application Generator Figure 3.15 AG More Complete Operations Menu LENGTH: Returns the number of characters in a variable LEFT: Isolates the left ‘n’ characters from a variable. Left 4 characters of IN = 092890, returns 0928. RIGHT: Isolates the right ‘n’ characters from a variable. Right 2 characters of IN = ABCDEFG, returns FG. MIDDLE: Is used to get data from the middle of a variable.
Chapter 3 Using Application Generator Figure 3.16 AG Other Operations Menu F2 – Beep: When the F2 – BEEP option is chosen the following sub-menu appears: Figure 3.17 AG Sound Menu Beep: The tone is set to 1000 Hz for 0.25 (1/4) of a second. Chirp : The tone is set to 2000 Hz for 0.15 of a second. Boop: The tone is set to 300 Hz for 1 second. Key in.. .: The workstation can produce sounds in the range of 100 to 3000 Hz. A low sounding tone is around 200 Hz. A high pitched tone is above 2000 Hz.
Chapter 3 Using Application Generator While you are testing your program, even a pause as short as 0.1 seconds will take a full second to execute on the PC. When you generate your program, the downloaded version will pause for the selected interval. F4 – Chain to Personality: If your program becomes too large to run as a single program then you will need to use chaining. This is a method of having one program start the execution of another.
Chapter 3 Using Application Generator F6 – GoSub (Call Subroutine): A GOSUB is a way of calling a subroutine. The subroutine can do its job and then return to the line immediately after the GOSUB statement. This makes it easier to write programs that have the kind of structure found in high level languages such as A-B VBASIC. F7 – Return (From Subroutine): When you write the subroutine that is called by the GOSUB statement, you must be sure to put a RETURN operation at the last line of the GOSUB.
Chapter 3 Using Application Generator The other menu contains these conditions that you can test for: Figure 3.19 AG On Other Inputs Menu Note: The destination variable must be in the IN variable. Adding A-B VBASIC Functions A-B VBASIC Functions are added to the Other Operations Menu by modifying the file AGUSER.BAS. You may add up to 10 named statements which will appear in a sub-menu named Additional Operations.
Chapter 3 Using Application Generator F8 – IF (Conditional) An IF statement is another way of changing the order or program execution. It allows you to GOTO a statement IF a variable is in some state. When F8 – IF is chosen you are asked for the Variable to compare. Then the Main Operations Menu is replaced with this sub-menu: Figure 3.20 AG Conditionals (IF) Menu In F2 through F5, you are prompted with “Value (text in quotes) or Variable name to compare : ”.
Chapter 3 Using Application Generator F9 – GoTo Or Loop To Position A GOTO is a way of changing the order in which operations are performed in your program. A program which contains no GOTOs will do one step after another until it reaches the last step. Then it will stop. Each GOTO specifies the line number to which the program should advance when the GOTO operation is reached. You can either key in a line number, enter a label or use the up and down arrow keys to find where you would like to go.
Chapter 3 Using Application Generator You can now start creating your program. The F5 option is used to generate a A-B VBASIC Program that can be downloaded into the workstation network. The F6 option is used to generate and download using Network Manager Software (Catalog No. 2708-NNM). The PC must be running NM V5.0 or later. The F7 option transfers you to NM to download you program. Use the Network Manager Software program to download your generated personality to your -DH5 workstation.
Chapter 4 Running & Compiling Applications Chapter 4 Running & Compiling Applications Introduction In this chapter you will find information on: • Running your program • Compiling your program • Downloading your program Running a Program Once you have typed in your your program, you can run it in the AG environment (by selecting [ALT]R). This offline simulation feature allows you to thoroughly test your program before downloading it.
Aoppendix A Sample Program Listing Appendix A Sample Program Listing Default Personality The listing that follows is for the default personality that appears at the bottom of the Main Menu when you first start AG. You can accept this personality simply by pressing [ENTER]. ––––– Personality DEFAULT generated by A.G. V3.
Aoppendix A Sample Program Listing 39 READ KBD to DEST 59 8 n>=100 n<=5000 Restart(3) 40 APPEND DEST to OP 41 GOTO AskForBadge(20) 42 SendBadge: 43 ’––––– Badge is sent to the host ––––– 44 MOVE ”Badge” to OP 45 SendData: 46 CLEAR SCREEN 47 SOUND 1000, .25 48 MOVE Sys:DATE to NET 49 APPEND Sys:TIME to NET comma separated 50 APPEND OP to NET comma separated 51 APPEND IN to NET comma separated 52 SEND NET to host data QUEUE 53 DISPLAY 15 9 from ”Thank You” 54 PAUSE .
Index Symbols Download program, 3 – 21 .AIP file extension, 1 – 1 [ALT] X. See Exit to DOS [ALT]R command, 4 – 1 E A A-B VBASIC, 1 – 1 A–B VBASIC, adding functions, 3 – 18 Add, 3 – 12 AGUSER.BAS, 3 – 18 Append, 3 – 12 Application Generator, description, 1 – 1 ASCII, convert to, 3 – 14 Autoexit, 3 – 6 Edit mode, 3 – 21 Exit program, 3 – 21 Exit to DOS shell, 3 – 21 Extension, .AIP, 1 – 1 F B Field Attributes menu, 3 – 6 File AGUSER.
Index K Key in sound frequency, 3 – 15 Key number, 3 – 5 Keystroke summary, 3 – 1 L Label, 3 – 17 LCD display, 3 – 21 LED number, 3 – 11 Left operation, 3 – 14 Length of variable, 3 – 14 Limits, and conditionals, 3 – 19 Limits in numeric fields, 3 – 5 Lookup, 3 – 13 Lookup Option menu, 3 – 8 Loudness, 3 – 15 M Main Operations menu, 3 – 3 Main Operations Screen, 2 – 1 Make integer, 3 – 13 Make numeric, 3 – 13 Memory, workstation, 3 – 10 Menu Communications Line/LED, 3 – 11 Communications Line/LED menu, 3
Index vs. personality file, 1 – 2 Program Download, 3 – 16 Program listing.
Rockwell Automation helps its customers receive a superior return on their investment by bringing together leading brands in industrial automation, creating a broad spectrum of easy-to-integrate products. These are supported by local technical resources available worldwide, a global network of system solutions providers, and the advanced technology resources of Rockwell. Worldwide representation.