File Transfer From 4294A To External Controller - Agilent Technologies 4294A Programming Manual

Precision impedance analyzer
Hide thumbs Also See for 4294A:
Table of Contents

Advertisement

Application Sample Programs
File Transfer Function

File Transfer from 4294A to External Controller

This program transfers a specified file in the current directory (RAM disk in the sample
program of Example 13-7 ) of the 4294A to the current directory of the storage device (A
drive in the sample program of Example 13-7 ) connected to the external controller, giving
a file name you desire.
When executed, this program first prompts you to enter a source file name, as shown
below. Enter the name of a file you want to transfer.
Then, the program prompts you to enter a destination file name as shown below, and in this
example, SAMPLE.STA has been entered as the source file name. Enter the file name you
want to give on the storage device. Note that a file with the same name will be overwritten,
if it already exists.
Example 13-7
Sample Program: File Transfer from 4294A to External Controller
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300 Skip_purge:
310
320
330
340
350
360
370
240
ENTER SOURCE FILE NAME ON INSTRUMENT ?
ENTER SOURCE FILE NAME ON INSTRUMENT ?
ENTER DESTINATION FILE NAME ON CONTROLLER ?
!
!
File transfer (Instrument -> Controller)
!
DIM Src_file$[50],Dst_file$[50]
ASSIGN @Agt4294 TO 717
OUTPUT @Agt4294;"*rst"
!
MASS STORAGE IS "a:\"
OUTPUT @Agt4294;"STOD MEMO"
!
PRINT "
ENTER SOURCE FILE NAME ON INSTRUMENT ?
INPUT Src_file$
PRINT Src_file$
!
PRINT "
ENTER DESTINATION FILE NAME ON CONTROLLER ?
INPUT Dst_file$
PRINT Dst_file$
!
Copy_from_instr(@Agt4294,Src_file$,Dst_file$)
!
END
!
!
copy_from_instrument
!
SUB Copy_from_instr(@Agt4294,Src_file$,Dst_file$)
DIM Len$[6],Img$[32],Dmy$[2]
!
ON ERROR GOTO Skip_purge
PURGE Dst_file$
OFF ERROR
CREATE Dst_file$,1
ASSIGN @Dst_file TO Dst_file$
!
CLEAR @Agt4294
OUTPUT @Agt4294;"CLES"
OUTPUT @Agt4294;"ROPEN """;Src_file$;""""
IF FNCheck_error(@Agt4294,"<CPFI: ropen>")=-1 THEN SUBEXIT
SAMPLE.STA
";
";
13

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents