beautypg.com

About cambasic, Major features – Remote Processing CAMBASIC User Manual

Page 4

background image

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. T his version was adapted
for Remote Pr ocessing Corporation.

CAM BASIC 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. How ever, the performance and the industrial
extensions set C AM BASIC apart fr om any o ther BAS IC dialec t.

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. W e 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 exp erience , the re ar e literally doz ens of books tha t can teach yo u to
program in BASIC. Knowledge of electr onics and/or digital circuitry is not requir ed to write successful pr ogram s.

Major Features

I n ad d it io n to th e co m m a nd s an d fe a tu r e s i n B A SI C s l ik e th o se f ou n d i n p e r so n al co m p ut e rs , C A M B A SI C h as so m e
important extensions for industrial control, data acquisition, and ease– of– use.

1.

Labels Supported

Y o u c a n c a ll a s u br o u ti ne b y n a m e i n a d di ti on to th e li ne n um b e r . T hi s m a k es p ro g r am s
s e lf – d o cu m e nt in g . T he e xa m p le b el ow s ho w s a f ra g m en t o f an o ve r – t e mp e r at ur e p ro g r am .

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 pr e-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 pr ecede the labels.

2.

No line numbers
Line labels m ean you can write co de virtually w ithout line num bers. The abov e exam ples could
easily be written in a text file as:

I F T E M P > 1 5 0 T H E N . . H E A T _O F F

.
.

. . H E A T _ O F F