2 - developing and running an a-b vbasic program, The a-b vbasic development procedure, Developing and running an a-b vbasic program – Rockwell Automation 2708-NBD VBASIC Language Development Kit User Manual

Page 12

Advertising
background image

A–B

2

Chapter

2–1

Developing and Running
an A-B VBASIC Program

Step #1 – Planning

The 2708-DH5Axx workstations have approximately 96K bytes dedicated for
program memory. Programs that are larger than about 20-30 pages of BASIC
source code need to be broken up into several smaller CHAINed programs. It
is much easier to plan for this in the design stage than to be forced into it in
the coding stage.

For smaller applications (applications that can be coded in 20-30 pages of
source or less) there is no need to worry about the CHAIN statement. By far
the majority of applications fall into this category.

Step #2 – Coding with the Workstation Application Generator Software

For many data collection programs, a software development tool called the
Application Generator Software (Catalog No. 2708-NAG) may be all you
need to implement your application. Application Generator Software is
extremely useful in the development of applications, prototyping applications
with an end-user, and creating demonstration programs quickly. Application
Generator Software requires very little learning curve. It allows the program
to be simulated on the PC, which helps in the testing and debugging of the
program, and outputs a syntactically correct A-B VBASIC source program as
a “.BAS” file, which can then be compiled as described later.

Step #3 (Alternate) – Coding with Visual BASIC Editor

If you do not use Application Generator Software, it is recommended that
you enter your A-B VBASIC programs using the Visual BASIC editor. This
provides syntax checking, subroutine and function menus, and liberal help
screens. Since A-B VBASIC is a subset of Visual BASIC, you can enter any
A-B VBASIC commands with the editor.

Note: When using the Visual BASIC programming environment, be sure to
save your A-B VBASIC program file in ASCII text format rather than the
compact format. (Use the SAVE AS option in the Visual BASIC editor.)

Step #4 – Simulation Using Application Library

A design goal for A-B VBASIC was to have the workstation behave like a
PC when running the same code. Since the PC and workstation act the same,
the ideal place to test the subroutines of your application is right on the PC
itself in the Visual BASIC environment.

The A-B VBASIC
Development Procedure

Advertising