Remote-processing RPC-30 Bedienungsanleitung Seite 9

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 38
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 8
CHAPTER 2 SETUP AND OPERATION
RPC-30 Page 7
'Check VAT temperature
'Read the output from the RTD and
' calculate the temperature
2200 a = ain(0) :'Get temp
The first 3 comments downloaded to the RPC -30
would be ignored. Similarly, the empty lines between
comm ents are a lso ignored . Line 2200, with its
comment, is a part of the program and could be listed.
The major pena lty by wr iting a progr am this way is
increased download time.
NOTE: Some versions of PC SmartLINK may
optionally strip comments before downloading.
Check your m anual to see if this op tion is
available.
Notice that you can write a program in lower case
characters. CAMBASIC translates them to upper case.
Some program mers put "N EW" as the first line in the
file. During debugging, it is common to insert
"temporary" lines. This ensures that these lines are
gone. Downloading time is increased when the old
program is still pre sent.
If you like to write programs in separate modules, you
can download them separately. Modules are assigned
blocks of line numbers. Start up code might be from 1
to 999. Interrupt handling (keypad, serial ports) might
be from lines 1000 to 1499. Display output might be
from 1500 to 2500. The program mer m ust determine
the number of lines required for each section.
When replacing a program or section, downloading time
is increased. Blocks of line numbers cannot be
renumbered by CAMBASIC when other par ts of the
program are installed. However , if a particular section
is the only program downloaded, then line renumbering
in that range is possible. Refer to the CAMBASIC
RENU M comm and.
CAM BASIC automatically formats a line for minimum
code space and increased readability. For example, you
could download the following line of code:
10 fora= 0to5
When you listed this line, it would appear as:
10 FOR A = 0 TO 5
Spaces are displayed but not stored. The following line:
10 for a = 0 to 5
would be compressed and displayed as in the second
example above. Spaces are removed.
The CAMBASIC Programming Manual has information
about increasing program speed and editing options.
Instead of uploading and downloading programs, you can
save them to the on card EEPROM. This is useful if you
are using a terminal to write program s. Make sure the
'AUTORUN' jumper is installed (See WRITING AND
SAVING PROGRAM S). To prevent automatic program
execution on power up, insert the STOP statement at the
beginning of the program (such as line 1). When you
power up the RP C-30, the progr am is transferr ed into
RAM and executed. Delete the program line with the
STOP statement to normally start programs. When
saving programs, be sure to reenter the STOP statement
with its line number.
WHERE TO GO FROM HERE
If you want to d o this: Turn to
chapter
Save a program 3
Run a program at power up or reset
(autorun)
3
Know m ore abo ut serial por ts 4
Install a different RAM memory chip 5
Using RAM to save variables 5
Configure digital I/O lines 6
Get switch status 6
Use high current outputs 6
Use on board opto rack 6
Connect an external opto rack 6
Learn to use G5 m odule 6
Use the calendar/clock 7
Write to displays 8
Seitenansicht 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 37 38

Kommentare zu diesen Handbüchern

Keine Kommentare