Agilent Technologies A.18.00 Weather Radio User Manual


 
401
Chapter 7, IBASIC Controller
PROGram Subsystem
Example
#16<data byte><data byte><data byte><data byte><data byte><data
byte>
The transfer is terminated by the transmission, from the Test Set to the external control-
ler, of the response message terminator (NL & END messge).
<NL> = new line = ASCII linefeed character.
<END> = IEEE 488.1 END message.
Syntax
PROGram[:SELected]:DEFine?
Example BASIC program to upload an IBASIC program from Test Set
10 DIM Prog_line$[200]!Holds longest program line in Test Set
20 DIM File_name$[10]!Holds the name of file to store IBASIC pro-
gram
30 LINPUT "Enter name of file to store IBASIC program
in:",File_name$
40 OUTPUT 714;"PROG:DEF?"
50 ENTER 714 USING "X,D,#";Count_length !Get length of count field
60 !Get number of characters in program, includes CR/LF on each line
70 ENTER 714 USING VAL$(Count_length)&"D,#";Chars_total
80 !Create ASCII file to hold program, add 5 records for buffer
90 CREATE ASCII File_name$,(Chars_total/256)+5
100 ASSIGN @File TO File_name$
110 LOOP
120 ENTER 714;Prog_line$ !Read in one program line
130 OUTPUT @File;Prog_line$ !Store in file
140 Chars_xferd=Chars_xferd+LEN(Prog_line$)+2 !CR/LF not read
150 EXIT IF Chars_xferd>=Chars_total
160 END LOOP
170 ENTER 714;Msg_terminator$ !Terminate the block data transfer
180 ASSIGN @File TO *
190 END