
Introduction - 1
ABOUT CAMBASIC
CAMBASIC is the result of 18 years of industrial language development at Octagon. Its major strengths are
ease– of– use, unequaled performance and the rich vocabulary of industrial BASIC commands. This version was adapted
for Remote Pr ocessing Corporation.
CAMBASIC is a real time, multitasking, language for control and data acquisition applications. It programs easily and has
most of the BASIC language commands found on personal computers. However, the performance and the industrial
extensions set C AM BASIC apart from any other BAS IC dialect.
While all the commands and structures in this manual have examples of their use, this manual is not intended to teach you
how to program in BASIC. We assume that you have at least some familiarity with BASIC or some other high level
language. If you have no t had any pr ogram ming experience , there ar e literally dozens of books that can teach you to
program in BASIC. Knowledge of electr onics and/or digital circuitry is not required to write successful programs.
Major Features
In addition to the commands and features in BASICs like those found in personal computers, CAMBASIC has some
important extensions for industrial control, data acquisition, and ease– of– use.
1. Labels Supported
You can call a subroutine by name in addition to the line number. This makes programs
self– documenting. The example below shows a fragment of an over– temperature program.
10 IF TEMP>150 THEN 500
.
.
500 OUT HEAT,0
With labels the same code would be:
10 IF TEMP>150 THEN ..HEAT_OFF
.
.
500 ..HEAT_OFF
510 OUT HEAT,0
The labels may be any length up to 40 characters. Since they are pre-compiled, long labels do not
slow program execution.
Line labels may be used only with GOTO and GOSUB statements. They may not be used with ON
GOTO or ON GOSUB type commands. Labels may be used as a part of conditional IF– THEN
statements, provided the GO TO com mand precede the labels.
2. No line numbers
Line labels m ean you can write co de virtually w ithout line numbers. The above examples could
easily be written in a text file as:
IF TEMP> 150 THEN ..HEAT_OFF
.
.
..HEAT_OFF
Kommentare zu diesen Handbüchern