Specifications

Introduction - 1
ABOUT CAMBASIC
CAMBASIC is the logical result of 13 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 written for
Remote Processing 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 CAMBASIC apart from any other BASIC 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 not had any programming experience, there are literally dozens of books that can teach you to
program in BASIC. Knowledge of electronics 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 precompiled, 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 GOTO command precede the labels.
2. Full Screen Editor
When using PC SmartLINK with CAMBASIC, you can do full screen editing. You also have a line
editor, which is used with terminals.
3. Nonvolatile Variables
CAMBASIC has a special set of 26 process variables (A% through Z%) that are not zeroed on
power–up or reset. These variables are used in exactly the same manner as the normal variables.
With a battery–backed RAM module, these variables will automatically retain their values if the
power goes off. They also are precompiled, so they execute faster than standard variables.