HP 8920A Programmer's Manual page 403

Rf communications test set
Hide thumbs Also See for 8920A:
Table of Contents

Advertisement

10
! ASCII_DN
20
! Program to download ASCII program file from PC to the Test Set through RS-232
30
! ######################################################################
40
!
50
! This program must be loaded into the Test Set and run on the Test Set.
60
! It directs ASCII characters that come in the Serial Port 9 to a file
70
! named "TEMP_CODE" on an SRAM card. After the transfer is complete,
80
! you must SCRATCH this program and GET the transferred program from
90
! the "TEMP_CODE" file.
100 !
110 !
#####################################################################
120
COM /File_name/ File_name$[10]
130
DIM In$[200]
140
File_name$="TEMP_CODE"
150
CLEAR SCREEN
160
CLEAR 9
170
OUTPUT 800;"*RST"
180 ! Set up Test Set Serial Port 9 to receive ASCII text file
190
OUTPUT 800;"CONF:SPORT:BAUD '9600';PAR 'None';DATA '8 Bits'"
200
OUTPUT 800;"CONF:SPORT:STOP '1 Bit';RPAC 'Xon/Xoff';XPAC 'Xon/Xoff'"
210
OUTPUT 800;"CONF:SPORT:SIN 'IBASIC';IBECHO 'OFF'"
220
CALL Code(File_name$,In$)
230
END
240 Purge_it:SUB Purge_it
250
COM /File_name/ File_name$
260
OFF ERROR
270
PURGE File_name$&":INTERNAL"
280
SUBEND
290 Code:SUB Code(File_name$,In$)
300
ON ERROR CALL Purge_it
310
CREATE ASCII File_name$&":INTERNAL",650
320
OFF ERROR
330
ASSIGN @File TO File_name$&":INTERNAL"
340
PRINT TABXY(1,5);"Ready to receive ASCII file data."
350
PRINT
360 Begin:ON TIMEOUT 9,1 GOTO Begin
370
ENTER 9;In$
380
OUTPUT @File;In$
390
PRINT In$
400 Transfer:LOOP
410
ON TIMEOUT 9,5 GOTO Done
420
ENTER 9;In$
430
PRINT In$
440
OUTPUT @File;In$
450
END LOOP
460 Done:ASSIGN @File TO *
470
CLEAR SCREEN
480 ! Returns Test Set Serial Port 9 input to "instrument" allowing serial
490 ! communication to the IBASIC Command line field.
500
OUTPUT 800;"CONF:SPORT:SIN 'Inst';IECHO 'ON';IBECHO 'ON'"
510
PRINT TABXY(1,5);"Down load of ASCII file is complete."
520
SUBEND
Method #3. Developing Programs Using Word Processor on a PC (Least Preferred)
!Branches if CREATE statement returns error
!Loops to bring in ASCII file one line at a time
!Exit loop if data stops for >5 sec.
!File name on RAM card
!Clears Test Set serial bus
!Purges File_name on card
!Creates file on card
!Loops until data begins coming
Chapter 7, IBASIC Controller
403

Advertisement

Table of Contents
loading

Table of Contents