EasyManua.ls Logo

FTS MAXI-COOL - Sample Program; Program

FTS MAXI-COOL
66 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
EDC Programmer’s Reference
Maxi-Cool
50 Rev 007, 04/12
© SP Scientific 2012
Sample Program
The following program is supplied to assist in troubleshooting should the user’s
attempts to communicate via the RS-232 be unsuccessful. It will execute properly
from either GWBASIC or QBASIC on an IBM-compatible PC. If this program runs, the
alternate driver has a software or configuration problem. If this program does not run
properly, a hardware problem (usually a mis-wire) is indicated.
This program was designed to be as simple as possible. It therefore performs no
syntax checking or error detection. It will prompt “COMMAND?”, to which the user
should type the string desired to send (e.g., “SP?<CR>”). The character string
returned by the MPC will be displayed on the user’s terminal. Users will note that the
transmit/receive strings appear to be “out of synch” on the terminal display; this is also
to keep the program as short and unencumbered as possible.
The Rubout, Backspace, and Delete keys will NOT work. They will be transmitted like
any other character (and will result in an error message “Illegal Character”).
Once the program has been typed into BASIC (or loaded from disk), it may be run
from GWBASIC by typing “RUN”, or from QBASIC from ALT-R-S or Shift-F5. To stop
the program, use CTL-BREAK.
Program
5 OLINE$=""
10 OPEN "COM1:9600,N,7,1,RS" AS #1
20 PRINT "COMMAND: ";
30 A$=INKEY$
40 IF A$="" THEN GOTO 110
50 PRINT A$;
60 OLINE$=OLINE$+A$
70 IF A$ <> CHR$(13) THEN GOTO 30
80 PRINT #1,OLINE$;
90 OLINE$=""
100 GOTO 20
110 WHILE NOT EOF(1)
120 B$=INPUT$(LOC(1),#1)
130 PRINT B$;
140 WEND
150 GOTO 30

Related product manuals