Remote Processing Coorporation RPC-320 Specifications

Browse online or download Specifications for Unknown Remote Processing Coorporation RPC-320. Remote Processing Coorporation RPC-320 Specifications User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 186
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
COPYRIGHT
Copyright 1988-1994 – Octagon Systems and Remote Processing Corp. All rights reserved.
Modifications by Remote Processing Corporation, Copyright 1999
The software described in this manual is furnished under a license agreement and may be used only in accordance with the
terms of the agreement.
The contents of this manual and the specifications herein may change without notice.
TRADEMARKS
CAMBASIC™, Micro PC™, PC SmartLINK™ and Event Multitasking™ are trademarks of Octagon Systems.
IBM PC® is a registered trademark of IBM Corporation.
QBASIC® is a registered trademark of Microsoft Corporation.
Remote Processing Corp.
7975 E. Harvard Ave.
Denver, CO 80231
Phone:303–690–1588
FAX: 303-690-1875
www.rp3.com
Document Order #1042
Rev 1.1
Page view 0
1 2 3 4 5 6 ... 185 186

Summary of Contents

Page 1 - TRADEMARKS

COPYRIGHTCopyright 1988-1994 – Octagon Systems and Remote Processing Corp. All rights reserved.Modifications by Remote Processing Cor

Page 2 - HOW TO USE THIS MANUAL

Concepts - 4Below is a list of CAMBASIC commands. Some CPU Cards do not use all of the commands. Refer to your hardwaremanual for ex

Page 3 - PRODUCT SUPPORT

Commands - 70MID$String FunctionSYNTAX: n$ = MID$(m$,p[,q])PURPOSE: To return the requested part of a given string.REMARKS: The functi

Page 4 - ABOUT CAMBASIC

Commands - 71MID$String StatementSYNTAX: MID$(a$,s [,n]) = b$PURPOSE: To replace a portion of one string with another.REMARKS: A commo

Page 5

Commands - 72MODOperatorSYNTAX: n = a MOD bPURPOSE: To return the remainder of an integer division.REMARKS: a is divided by b and the

Page 6

Commands - 73MONCommandSYNTAX: MON PURPOSE: To invoke the Mini–MonitorREMARKS: The Mini–Monitor is used primarily for debugging object

Page 7 - Line Renumbering

Commands - 74NEW and UNNEWCommandsSYNTAX: NEWUNNEWPURPOSE: NEW initializes CAMBASIC for a new program.UNNEW restores a program erased

Page 8 - Communications Ports

Commands - 75ONStatementSYNTAX: ON expression GOSUB line [,line] ...ON expression GOTO line [,line] ...PURPOSE: In the ON...GOTO state

Page 9 - Character Set

Commands - 76ON BITTasking StatementSYNTAX: ON BIT task number,address,bit GOSUB line/labelPURPOSE: To declare an I/O line to be monit

Page 10

Commands - 77ON COM$Tasking StatementSYNTAX: ON COM$ n GOSUB line/labelON COM$ n GOSUBPURPOSE: To define a program branch when a task

Page 11 - 10 ON KEYPAD$ GOSUB 50

Commands - 78ON COUNTTasking StatementSYNTAX: ON COUNT n GOSUB line/labelON COUNT n GOSUBPURPOSE: To execute a subroutine when a prese

Page 12 - 10 . .

Commands - 79ON ERR GOTOStatementSYNTAX: ON ERR GOTO line/labelPURPOSE: To enable error trapping and specify the first line of the err

Page 13

Concepts - 5Software and Hardware InterruptsCAMBASIC supports multiple hardware and software interrupts. These interrupts causes the

Page 14 - 10 DIM TEMP(20,20)

Commands - 80ON INPTasking StatementSYNTAX: ON INP n, address, mask, compare GOSUB line/labelPURPOSE: To cause an interrupt when a pre

Page 15

Commands - 81ON ITRTasking StatementSYNTAX: ON ITR n GOSUB line/labelON ITR n GOSUBPURPOSE: To enable or disable a program branch due

Page 16

Commands - 82ON KEYPAD$Tasking StatementSYNTAX: ON KEYPAD$ GOSUB line/labelON KEYPAD$ GOSUBPURPOSE: To cause a program branch when any

Page 17 - Expression Evaluation

Commands - 83ON TICKTasking StatementSYNTAX: ON TICK n,t GOSUB line/labelON TICK n,t GOSUBPURPOSE: To cause periodic program branching

Page 18

Commands - 84OPTOProcess FunctionSYNTAX: a = OPTO (channel)PURPOSE: To return the status of an input on an on board opto isolator rack

Page 19 - CAMBASIC EDITOR

Commands - 85OPTOProcess StatementSYNTAX: OPTO channel, valuePURPOSE: To turn output modules on and off on 24 position opto-isolator r

Page 20 - LINE EDITING COMMANDS

Commands - 86PEEK and POKEMemory Function and StatementSYNTAX: n = PEEK(address)n = PEEK(address,segment)POKE address, dataPOKE addres

Page 21

Commands - 87PEEK$ and POKE$Memory Function and StatementSYNTAX: x$ = PEEK$(address)x$ = PEEK$(address, segment)POKE $ address, X$POKE

Page 22

Commands - 88PRINTStatementPR [#n,] [expression] [; or ,] [expression]..PRINT [#n,] [expression] [; or ,] [expression]..PURPOSE: To ou

Page 23

Commands - 89In the example below, the semicolon at the end of line 20 causes both PRINT statements to be printedon the same line.10 I

Page 24 - Other Tips

Concepts - 6SAVING AND LOADING PROGRAMSSaving and loading programs to and from nonvolatile memory is as easy as typing “SAVE” and “LOA

Page 25 - 10 IF A=>1.23 THEN 100

Commands - 90PRINT USINGStatementSYNTAX: PRINT USING[#n,]!"format string"; expressionPURPOSE: To print strings or numbers us

Page 26

Commands - 91A = 1234.67PRINT USING "#.##ˆˆˆˆ";A0.12E+4In this case the first # specifies the leading zero to the left of th

Page 27

Commands - 92PRINT$StatementSYNTAX: PRINT [#n,] $ character [,character]...PR [#n,] $ character [,character]...PURPOSE: Used to send a

Page 28

Commands - 93PULSEProcess FunctionSYNTAX: n=PULSE(m)PURPOSE: To return the remaining time of a pulsed output.REMARKS: The resolution o

Page 29

Commands - 94PULSETasking StatementSYNTAX: PULSE n,address,bit,time,polarityPURPOSE: To configure a digital output line as a timed or

Page 30

Commands - 95READStatementSYNTAX: READ variable [,variable] . . .PURPOSE: To read values from a DATA statement and assign them to vari

Page 31 - PRINT ABS(–7)

Commands - 96REMARKStatementSYNTAX: 'any charactersPURPOSE: To allow explanatory remarks to be inserted in a program or designate

Page 32

Commands - 97RENUMCommandSYNTAX: RENUM [newline] [,increment] [,oldline]PURPOSE: To renumber program lines.REMARKS: newline is the fir

Page 33

Commands - 98RESTOREStatementSYNTAX: RESTORE [line]PURPOSE: To reset the READ pointer to the beginning of the DATA list.REMARKS: After

Page 34 - 20 PRINT ASC(F$)

Commands - 99RESUMEStatementSYNTAX: RESUMERESUME NEXTRESUME linePURPOSE: To continue program execution after an error recovery procedu

Page 35

Concepts - 7Variables may contain keywords, as long as the keyword is not first. Keywords may be imbedded in variable names. Forexam

Page 36

Commands - 100RESUME COUNTTasking StatementSYNTAX: RESUME COUNT m [,m1] [,m2] . . . [,mn]PURPOSE: To reenable a software event counter

Page 37 - PRINT BIN(INP(&18))

Commands - 101RETURNStatementSYNTAX: RETURN [line/label]RETURN ITR numberPURPOSE: To resume execution after a GOSUB, interrupt, multit

Page 38 - 11000111

Commands - 102RIGHT$String FunctionSYNTAX: n$ = RIGHT$(m$,p)PURPOSE: To return the right–most p characters of m$ as a string.REMARKS:

Page 39

Commands - 103RNDNumeric FunctionSYNTAX: n = RND(m)PURPOSE: To return a pseudo–random number between 0 and 1.REMARKS: The RND function

Page 40

Commands - 104RUNCommandSYNTAX: RUN [line]PURPOSE: To begin the execution of a program.REMARKS: RUN resets the numeric variables to ze

Page 41

Commands - 105SAVECommandsSYNTAX: SAVE SAVE segmentSAVE DATA,to Flash segment, to Flash address, from RAM segment, from RAM address, l

Page 42

Commands - 106SINNumeric FunctionSYNTAX: n = SIN(m)PURPOSE: To calculate the trigonometric sine function.REMARKS: m is an angle in rad

Page 43 - $$$$$$$$$$

Commands - 107START BITTasking StatementSYNTAX: START BIT task number [,task number]. . .PURPOSE: To enable a BIT task that has previo

Page 44 - 10 CLEAR

Commands - 108START COUNTTasking StatementSYNTAX: START COUNT n [,n1] [,nm]PURPOSE: To activate a software counter task that was previ

Page 45 - CLEAR COM$

Commands - 109START INPTasking StatementSYNTAX: START INP n [,n1] [,n2] PURPOSE: To enable one or more INP tasks declared by the ON IN

Page 46 - CLEAR COUNT

Concepts - 8Lower–case characters have a higher ASCII value than upper–case characters. If two strings are identical up to the pointt

Page 47 - CLEAR TICK

Commands - 110STOPStatementSYNTAX: STOPPURPOSE: To terminate program execution and return to command level.REMARKS: STOP statements ma

Page 48 - CLEAR PULSE

Commands - 111STOP BITTasking StatementSYNTAX: STOP BIT task [,task] . . .PURPOSE: To disable a bit that has previously been defined w

Page 49

Commands - 112STOP COUNTTasking StatementSYNTAX: STOP COUNT n [,n1] [,nn]PURPOSE: To deactivate a software counter task that was previ

Page 50

Commands - 113STOP INPTasking StatementSYNTAX: STOP INP n [,n1] [,n2]PURPOSE: To disable one or more INP tasks declared by the ON INP

Page 51

Commands - 114STR$String FunctionSYNTAX: n$ = STR$(m)PURPOSE: To convert a number to a string.REMARKS: For positive numbers, the strin

Page 52

Commands - 115SYSSystem FunctionSYNTAX: a = SYS(n)PURPOSE: To access system data and addresses.REMARKS: n is the system number.The fol

Page 53

Commands - 116The SYS(6) and SYS(7) will return 0 if no error has occurred. Any nonzero value means an errorhas occurred and you can

Page 54 - 20 A(X) = COUNT(X)

Commands - 117TABPrint FunctionSYNTAX: PRINT TAB(m)PURPOSE: To tab to position m.REMARKS: m ranges from 0 to 255If the current print p

Page 55

Commands - 118TANNumeric FunctionSYNTAX: n = TAN(m)PURPOSE: To return the trigonometric tangent of m.REMARKS: The angle m must be in r

Page 56 - 20 DATE$ = A$

Commands - 119TICKProcess FunctionSYNTAX: a=TICK(n)PURPOSE: To return the time from the TICK timers.REMARKS: There are three TICK time

Page 57 - 02-11-91

Concepts - 9error message. Subsequent lines will become garbled as the synchronous nature of data transmissionis lost.When numeric co

Page 58 - DEC & DECF

Commands - 120TIME$FunctionSYNTAX: a$ = TIME$(n)PURPOSE: The TIME$ function is used to read the system calendar/clock. The system clo

Page 59 - DEL 10 Deletes line 10

Commands - 121TIME$StatementSYNTAX: TIME$ = time stringPURPOSE: TIME$ is used to set the time on the system calendar/clock. The clock

Page 60 - 10 DELAY .5 delays 1/2 second

Commands - 122TRON/TROFFStatementSYNTAX: TRONTROFFPURPOSE: To trace program execution and/or display variable values.REMARKS: You exec

Page 61 - 20 DIM B(10,10,10)

Commands - 123VALNumeric FunctionSYNTAX: n = VAL(m$)PURPOSE: To convert a string to a number.REMARKS: The VAL function strips leading

Page 62

Commands - 124VARPTRNumeric FunctionSYNTAX: VARPTR(variable)PURPOSE: To return the address in RAM of the variable. This command is si

Page 63

Commands - 125On power–up, you have 100 bytes of string space. You can change this with the CLEAR statement. (Beneath the string area

Page 64 - Commands - 34

CONFIG Commands - 1CONFIG BAUDStatementSYNTAX: CONFIG BAUD n,baud rate, mode, parity [,com]PURPOSE: To change the serial port paramete

Page 65 - DO/UNTIL

CONFIG Commands - 20 = RS-232 (default)1 = RS-422 (transmitter always on)2 = RS-485RELATED: noneEXAMPLE: 10 CONFIG BAUD 1,6,5,0This se

Page 66 - DPEEK and DPOKE

CONFIG Commands - 3CONFIG BREAKStatementSYNTAX: CONFIG BREAK com port,modePURPOSE: To enable or disable response to a break character

Page 67

CONFIG Commands - 4CONFIG CLOCKStatementSYNTAX: CONFIG CLOCK mode,runCONFIG CLOCK run (RPC-2350 series only)PURPOSE: Configures real t

Page 68 - 60 RETURN

Concepts - 10> greater than X>Y < less than X<Y>= greater than X>=Y or equal to<= less than X<=Yor equal toRel

Page 69

CONFIG Commands - 5CONFIG COM$Tasking StatementSYNTAX: CONFIG COM$ n,terminator,length,XON,echoPURPOSE: To configure a communication p

Page 70

CONFIG Commands - 6CONFIG COUNTTasking StatementSYNTAX: CONFIG COUNT number,address,bit [,preset] [,AUTO]PURPOSE: To define the charac

Page 71

CONFIG Commands - 7CONFIG DISPLAYStatementSYNTAX: CONFIG DISPLAY address,type,cursorPURPOSE: To install a driver for a displayREMARKS

Page 72 - EXIT and EXIT CLEAR

CONFIG Commands - 8510 CONFIG DISPLAY & 40,3,0520 DISPLAY “REMOTE PROCESSING”;530 DISPLAY (3,1) “Tick = “;540 DISPLAY (3,8);550 PR

Page 73 - 2.71828 7.38906

CONFIG Commands - 9CONFIG PIOStatementSYNTAX: CONFIG PIO init,port A,port B, port LC, port UC [,address]PURPOSE: To initialize an 82C5

Page 74

Program debugging - 1PROGRAM DEBUGGINGCAMBASIC has several constructs which can be used to debug a program. This section will outline

Page 75 - Commands - 45

Program debugging - 290 INC H100 RETURNRUN.30..40..90..100..50..40..90..100..50..40..90..100..50..60.USING MON TO EXAMINE MEMORYWhen s

Page 76 - FOR / NEXT / STEP

Error Messages - 1The following list of error messages are returned by CAMBASIC. These indicate clearly, what is wrong, within the co

Page 77 - FPEEK and FPOKE

Error Messages - 2NUM MESSAGE EXPLANATION12 <Illegal immediate> A statement that is illegal in Immediate Mode is entered as an I

Page 78 - 34310 1000

Error Messages - 3NUM MESSAGE EXPLANATION27 <Data > 255> The argument or parameter may not exceed 255.28 <Data > 65,535

Page 79

Concepts - 11The NOT operator performs a logical negative of a value.Operand 1 0001 0111 = 23NOT Operand 1 1110 1000 = 232Value of exp

Page 80

Event Multitasking - 1Event MultitaskingEvent Multitasking was developed to give faster response to real time events. It is different

Page 81 - PRINT HEX$(1280)

Event Multitasking - 2There are a few exceptions. The INPUT and INPUT KEYPAD$ statements will ignore interrupts until the input isrec

Page 82 - IF / THEN / ELSE

Event Multitasking - 3Each counter may be assigned through software to any digital I/O line on any Control or expansion card. Onceco

Page 83 - INC and INCF

Event Multitasking - 4CONFIG COUNT counter, address, bit [,preset] [,AUTO]Where:counter is the counter number which may be 0 through 7

Page 84 - 50 GOTO 10

Event Multitasking - 5Line 10 configures counter 5 to read bit 1 of address 0 as an input. When the count reaches 2000,the counter wi

Page 85 - INP and OUT

Event Multitasking - 6NOTE: It is theoretically possible for the subroutine to take so long to execute that another 2000 counts isreac

Page 86 - Input pH, volume? _

Event Multitasking - 7You can try this by holding down the <ENTER> on your terminal so that it auto–repeats and enters count fas

Page 87 - INPUT KEYPAD$

Event Multitasking - 8parameters and are bits 0, 1 and 2. When the data at the port is ANDed with 7, and the value is 5(bits 0 and 2

Page 88

Event Multitasking - 9A=KEYPAD$(1)returns the key position number to a numeric variable. A zero is returned if no key was pressed. F

Page 89 - 30 PRINT INSTR(1,A$,B$)

Event Multitasking - 1055 B$=KEYPAD$(0)60 IF B$=CHR$(13) THEN ..Get_value65 IF B$="*" THEN B$="."70 A$=A$+B$75 RET

Page 90 - A=INT(B+0.5)

Concepts - 12>= (greater than or equal to)7. NOT (logical bitwise complement)8. AND (logical bitwise and)9. OR (logical bitwise or)

Page 91

Event Multitasking - 11250 RETURNand so forth.Line 40 tells CAMBASIC to call a subroutine by the name of “Keypad_interrupt” every time

Page 92 - 30 PRINT B$

Event Multitasking - 12MULTITASKING ON A CLOCK TICKThe three 200 Hz (100 Hz in 9 Mhz systems) tick timers are used for a number of mul

Page 93 - 20 PRINT LEN(A$)

Event Multitasking - 13PULSE MULTITASKINGIntroductionCAMBASIC supports eight timed (or pulsed) outputs. These are generated in softwa

Page 94 - 20 PRINT LINE(119)

Event Multitasking - 14Timer 0 is configured at address 0 and bit 1. The wait time is 0.05 seconds. The output will go high for 0.06

Page 95 - 20 PRINT LINE(113)

Differences - 1DIFFERENCES—CAMBASIC vs QBASIC1. CAMBASIC is a multitasking language while the others are not. This adds features to t

Page 96

Mini-Monitor - 1THE CAMBASIC MINI–MONITORThe Mini–Monitor is included in CAMBASIC primarily for those who will be combining object cod

Page 97

Mini-Monitor - 2Edit MemoryThis routine lets you poke hex values into memory. For example, to edit at A000, you enter the command bel

Page 98 - LOCK and UNLOCK

Program Editing - 1CAMBASIC EDITORUsing the Line EditorWhen using a CRT terminal to write programs, the resources of the PC are not av

Page 99 - PRINT LOG(45/7)

Preface - 1HOW TO USE THIS MANUALThis manual contains information on CAMBASIC and its commands. You will find that some information i

Page 100 - 20 PRINT MID$(A$,5,2)

Program Editing - 2CURSOR MOVEMENTThe display will appear as above. Press <SPC> twice. You will notice that the first two char

Page 101

Program Editing - 3Move the cursor to the “e” in edit.10 PRINT "This is";:PRINT" a simple edit"10 PRINT "This

Page 102

Program Editing - 410 PRINT "This is";:PRINT" a s_Type <R> and then <i>. You have replaced the “a” with an

Page 103

Programing Tips - 1How to Maximize Execution Speed1. Use the precompiled variable A% to Z%. In an average program these will run 50%

Page 104 - NEW and UNNEW

Programing Tips - 210. Spaces have no affect on speed since they are eliminated in the compiling process.11. Data statements execute s

Page 105 - 200 ON R GOTO 150,300,320,390

Programing Tips - 3second software interrupt occurs while the system is in a subroutine for another interrupt, nesting occurs. Thisme

Page 106

Command Summary - 1Command Syntax PurposeABS n=ABS(m) Returns absolute value of a numberAIN n=AIN(channel) Returns result of A/D conve

Page 107

Command Summary - 2Command Syntax PurposeDO/UNTIL DO list UNTIL expr. Executes until expression is trueDO/ENDDO DO n Fast loop structu

Page 108 - ON COUNT

Command Summary - 3Command Syntax PurposeLINE a = LINE(n) Read and write single bitLINE n, mLIST LIST Outputs program listingLOAD LOAD

Page 109 - ON ERR GOTO

Command Summary - 4Command Syntax PurposePRINT$ PRINT$ char [,char] Prints string of charactersPULSE n=PULSE(m) Returns time from puls

Page 110

Preface - 2PRODUCT SUPPORTIf you have a question about CAMBASIC and you cannot find the answer in this manual, call Technical Support

Page 111

Command Summary - 5Command Syntax PurposeTIME$ n$=TIME$(n) Reads calendar/clockTIME$=n$ Writes to calendar/clockTROFF TROFF Stops the

Page 112 - ON KEYPAD$

Commands - 1ABSNumeric FunctionSyntax: n = ABS(m)Purpose: To return the absolute value of the expression m.Remarks: The absolute value

Page 113

Commands - 2AINProcess FunctionSYNTAX: a = AIN(channel)PURPOSE: To return the analog input value.REMARKS: The channel is the channel n

Page 114 - 20 PRINT OPTO(0)

Commands - 3AOTProcess StatementSYNTAX: AOT channel,valuePURPOSE: To write data to a analog output port.REMARKS: AOT causes the analog

Page 115 - 20 PRINT OPTO(103)

Commands - 4ASCNumeric FunctionSYNTAX: n = ASC(m$) PURPOSE: To return the ASCII code for the first character of the string m$.REMARKS:

Page 116 - PEEK and POKE

Commands - 5ATNNumeric FunctionSYNTAX: n = ATN(m)PURPOSE: To return the arctangent of m.REMARKS: The result, n, of the ATN function is

Page 117 - PEEK$ and POKE$

Commands - 6BCDNumeric FunctionSYNTAX: n = BCD(m)PURPOSE: To return four digits in packed BCD format from a number.REMARKS: The four B

Page 118

Commands - 7BINNumeric FunctionSYNTAX: n = BIN(m)PURPOSE: To return a number from a packed BCD number.REMARKS: This function assumes t

Page 119

Commands - 8BIN$String FunctionSYNTAX: n$ = BIN$(m)PURPOSE: Returns an 8–bit binary representation of a number.REMARKS: The most signi

Page 120 - PRINT USING

Commands - 9BITProcess FunctionSYNTAX: n = BIT(I/O address,bit)PURPOSE: To read a specified bit at a specified I/O address.REMARKS: Th

Page 121

Introduction - 1ABOUT CAMBASICCAMBASIC is the logical result of 13 years of industrial language development at Octagon. Its major str

Page 122

Commands - 10BITProcess StatementSYNTAX: BIT I/O address,bit,valueBIT I/O address,bit,ONBIT I/O address,bit,OFFBIT I/O address,bit,NOT

Page 123 - 10 A=PULSE(2)

Commands - 11CALLStatementSYNTAX: CALL address [,m1] [,m2]. . .PURPOSE: To execute an assembly language program at the specified addre

Page 124 - PULSE 5,48,2,2.55,1

Commands - 12NOTE3: The CALL statement saves all the registers needed by CAMBASIC except IY. If thisregister is used, it must be re

Page 125 - 20 READ A(X)

Commands - 13CHR$String FunctionSYNTAX: n$ = CHR$(m)n$ = CHR$(m,n)PURPOSE: To convert an ASCII code to its character equivalent. Also

Page 126

Commands - 14CLEARStatementSYNTAX: CLEAR [string] PURPOSE: To set all numeric variables to zero, set all string variables to null, res

Page 127 - RENUM 1000,1,20

Commands - 15CLEAR COM$Process StatementSYNTAX: CLEAR COM$ nPURPOSE: To reset a serial port input buffer to the power–up condition.REM

Page 128

Commands - 16CLEAR COUNTTasking StatementSYNTAX: CLEAR COUNT n [,n1] . . . [,nm]PURPOSE: To clear the accumulated count in a software

Page 129

Commands - 17CLEAR TICKTasking StatementSYNTAX: CLEAR TICK nPURPOSE: To reset the internal TICK clock to zero. This does not affect a

Page 130 - RESUME COUNT

Commands - 18CLEAR PULSETasking StatementSYNTAX: CLEAR PULSE n [,n1] . . . [,nm]PURPOSE: To clear the remaining time in a software tim

Page 131 - 50 RETURN ITR 0

Commands - 19CLSStatementSYNTAX: CLS [#n]PURPOSE: To clear the screen of a terminal connected to a serial port using PC SmartLINK.REMA

Page 132 - 20 PRINT RIGHT$(A$,3)

Introduction - 24. Event MultitaskingCAMBASIC provides several types of multitasking. All defined tasks operate in the background and

Page 133

Commands - 20COM$Process FunctionSYNTAX: n$ =COM$(n)PURPOSE: To return a string from the serial input buffer. This function is usuall

Page 134 - 20 PRINT "HELLO"

Commands - 21CONFIGStatementSYNTAX: CONFIG command [list]PURPOSE: The CONFIG statement is used to set parameters for a number of indus

Page 135

Commands - 22CONTCommandSYNTAX: CONTPURPOSE: To resume program execution after a break.REMARKS: The CONT command may be used to resume

Page 136 - PRINT SIN(1.5)

Commands - 23COSNumeric FunctionSYNTAX: n = COS(m)PURPOSE: To return the trigonometric cosine function.REMARKS: m must be in radians.

Page 137 - START BIT

Commands - 24COUNTProcess FunctionSyntax: n =count(channel)Purpose: To return the count in the software event counters and return the

Page 138 - START COUNT

Commands - 25DATAStatementSYNTAX: DATA constant [,constant] . . . .PURPOSE: To provide a means to store numeric and string constants a

Page 139 - START INP

Commands - 26DATE$System StatementSYNTAX: DATE$ = date stringPURPOSE: DATE$ is used to set the date on the system calendar clock. The

Page 140

Commands - 27DATE$System FunctionSYNTAX: a$ = DATE$(n)PURPOSE: The DATE$ function is used read the date of the system calendar clock.

Page 141 - STOP BIT

Commands - 28DEC & DECFStatementsSYNTAX: DEC variableDECF variablePURPOSE: To decrement a variable by one (DEC) or four (DECF).REM

Page 142 - STOP COUNT

Commands - 29DELETECommandSYNTAX: DEL [–] line [–line] [–]PURPOSE: To delete CAMBASIC program lines.REMARKS: The DEL command erases th

Page 143 - STOP INP

Introduction - 3machine code segments are executed with the CALL statement. You can pass up to 20 parameters tothe machine code progr

Page 144

Commands - 30DELAYStatementSYNTAX: DELAY nPURPOSE: To create a precision delay. The resolution is 5 mS (10 ms on 9 Mhz systems).REMAR

Page 145 - PRINT SYS(2)–SYS(1)

Commands - 31DIMStatementSYNTAX: DIM variable (value) [,variable (value)] . . .PURPOSE: To specify the maximum size for array variable

Page 146 - 30 PRINT N,A,CHR$(A)

Commands - 32DISPLAYProcess StatementSYNTAX: DISPLAY data [,][;][data] . . .DISPLAY$ data [,data] . . .DISPLAY! "format";dat

Page 147

Commands - 33CLEAR DISPLAY Clears graphics and characters from displayCLEAR DISPLAY LINE Clears characters at current lineCLEAR DISPLA

Page 148 - 10 PRINT TAN(1.5)

Commands - 34Line 130 is a 0.5 second delay and the program repeats.ERROR: <Data negative> – for row and column<Data out of r

Page 149 - 30 PRINT TICK (2)

Commands - 35DO/UNTILStatementsSYNTAX: DO...UNTIL expression is true PURPOSE: To execute a conditional loop structure.REMARKS: The DO/

Page 150 - 11:23:45

Commands - 36DPEEK and DPOKEMemory Function and StatementSYNTAX: n = DPEEK(address)n = DPEEK (address, segment)DPOKE address, dataDPOK

Page 151 - 20 TIME$ = A$

Commands - 37EDITCommandSYNTAX: EDIT line“ . ”PURPOSE: To display a line for editing.REMARKS: The EDIT statement simply displays the l

Page 152 - TRON/TROFF

Commands - 38ENDStatementSYNTAX: ENDPURPOSE: To halt execution of a program at a given point.REMARKS: END causes execution to cease wi

Page 153

Commands - 39ERLSystem VariableSYNTAX: n = ERLPURPOSE: To return the line number associated with an error.REMARKS: The function return

Page 154

Concepts - 1Getting StartedTo program in CAMBASIC you will need a terminal to interface with your CPU card. This may be a CRT termina

Page 155

Commands - 40ERRSystem VariableSYNTAX: n = ERRPURPOSE: To return the error code associated with an error.REMARKS: The function returns

Page 156 - CONFIG BAUD

Commands - 41ERRORSystem StatementSYNTAX: ERR nERROR nPURPOSE: To simulate the occurrence of a run time error.REMARKS: This statement

Page 157 - 10 CONFIG BAUD 1,6,5,0

Commands - 42EXIT and EXIT CLEARStatementSYNTAX: EXIT [line/label]EXIT CLEARPURPOSE: To allow legal branching out of a loop structure.

Page 158 - CONFIG BREAK

Commands - 43EXPNumeric FunctionSYNTAX: n = EXP(m)PURPOSE: To return the exponential function of “e.”REMARKS: This function returns t

Page 159 - CONFIG CLOCK

Commands - 44FINDCommandSYNTAX: FIND argumentPURPOSE: Used to locate variables, keywords, and labels.REMARKS: This is a useful tool es

Page 160 - CONFIG COM$

Commands - 4520 GOSUB . . confirm50 GOSUB . . current_test>FIND . .200 . . confirm300 . . current_test>FIND . . confirm200 . . c

Page 161 - CONFIG COUNT

Commands - 46FOR / NEXT / STEPStatementsSYNTAX: FOR variable = n TO m [STEP z]...NEXTPURPOSE: To perform a loop operation a given numb

Page 162 - CONFIG DISPLAY

Commands - 47FPEEK and FPOKEMemory Function and StatementSYNTAX: a = FPEEK(address)a = FPEEK(address,segment)FPOKE address, dataFPOKE

Page 163 - CONFIG Commands - 8

Commands - 48FREFunctionSYNTAX: a = FRE(0)a = FRE(c$)PURPOSE: Returns the number of bytes of unused but allocated string space, or the

Page 164 - CONFIG PIO

Commands - 49GOSUBStatementSYNTAX: GOSUB line/label...RETURNPURPOSE: To branch to and return from a subroutine.REMARKS: line/label is

Page 165 - PROGRAM DEBUGGING

Concepts - 2Line LabelsYou can write a program to GOTO or gosub to a label instead of a line number. This makes for more readable cod

Page 166 - 100 RETURN

Commands - 50GOTOStatementSYNTAX: GOTO line/labelPURPOSE: To branch unconditionally out of the normal program sequence to a specified

Page 167

Commands - 51HEX$String FunctionSYNTAX: n$ = HEX$(m)PURPOSE: To return a hex representation of a number.REMARKS: The value of m may ra

Page 168

Commands - 52IF / THEN / ELSEStatementSYNTAX: IF m THEN statement(s) [ELSE statement(s)]IF m GOTO line/labelIF m THEN line/labelPURPOS

Page 169

Commands - 53INC and INCFStatementsSYNTAX: INC variableINCF variablePURPOSE: To increment a variable by one (INC) or four (INCF).REMAR

Page 170 - Event Multitasking

Commands - 54INKEY$FunctionSYNTAX: a$ = INKEY$(n)PURPOSE: To return a single character from a serial input buffer.REMARKS: The returne

Page 171 - COUNT MULTITASKING

Commands - 55INP and OUTI/O Function and StatementSYNTAX: n = INP(I/O address)OUT I/O Address, DataPURPOSE: INP returns a byte from an

Page 172

Commands - 56INPUTStatementSYNTAX: INPUT [,#n][;] var [,var] ...INPUT [,#n][;] "prompt message"; var [,var] ...INPUT [,#

Page 173

Commands - 57INPUT KEYPAD$StatementSYNTAX: INPUT KEYPAD$ echo port,variableINPUT KEYPAD$ echo port,"text",variableINPUT KEYP

Page 174

Commands - 58EXAMPLE: 10 ON KEYPAD$ 24 GOSUB 500 20 DISPLAY (1,0);30 INPUT KEYPAD$ 10,"Enter weight",WEIGHT 40 PRINT WEIGHT5

Page 175

Commands - 59INSTRFunctionSYNTAX: a = INSTR(n,string,substring)PURPOSE: Returns the position of the first occurrence on a substring wi

Page 176 - INP TASKING

Concepts - 3Real time MultitaskingCAMBASIC can perform several kinds of tasks at assembly language speed while the program is running.

Page 177 - KEYPAD MULTITASKING

Commands - 60INTNumeric FunctionSYNTAX: a = INT(b)PURPOSE: To return the largest integer that is equal to, or less than the argument.R

Page 178 - Applications Examples

Commands - 61KEYPAD$Process FunctionSYNTAX: a$=KEYPAD$(0)a=KEYPAD$(1)PURPOSE: To return a one–character string in response to a keypad

Page 179

Commands - 62LEFT$String FunctionSYNTAX: n$ = LEFT$(m$,p)PURPOSE: To return the leftmost p characters of m$.REMARKS: If p is greater t

Page 180 - 40 PRINT A$

Commands - 63LENNumeric FunctionSYNTAX: n = LEN(m$)PURPOSE: To return the number of characters in m$.REMARKS: Unprintable and blank ch

Page 181 - MULTITASKING ON A CLOCK TICK

Commands - 64LINEProcess FunctionSYNTAX: a = LINE(terminal #)PURPOSE: To return the status of an input on a STB-26 terminal board.REMA

Page 182 - PULSE MULTITASKING

Commands - 65LINEProcess StatementSYNTAX: LINE terminal #, valuePURPOSE: To write directly to the STB-26 terminal board.REMARKS: The t

Page 183

Commands - 66LISTCommandSYNTAX: LIST [line [–[line]]]LIST #n, [line [–[line]]]LIST!PURPOSE: To list a part or all of the program curre

Page 184

Commands - 67LOADCommandSYNTAX: LOADLOAD segmentLOAD DATA to RAM segment, RAM address, from Flash segment, Flash address, lengthPURPOS

Page 185 - THE CAMBASIC MINI–MONITOR

Commands - 68LOCK and UNLOCKTasking StatementsSYNTAX: LOCKUNLOCK [RETURN]PURPOSE: To lock out interrupts from time critical portions o

Page 186

Commands - 69LOGNumeric FunctionSYNTAX: n = LOG(m)PURPOSE: To return the natural logarithm of m.REMARKS: The natural logarithm is the

Comments to this Manuals

No comments