![Agilent Technologies Agilent 4396B Gpib Programming Manual Download Page 85](http://html.mh-extra.com/html/agilent-technologies/agilent-4396b/agilent-4396b_gpib-programming-manual_2867995085.webp)
d
a
10
!
20
!
Figure
11-8.
File
transfer
(Controller
->
Instrument)
30
!
40
DIM
Src_file$[50],Dst_file$[50]
50
ASSIGN
@Hp4396
TO
717
60
OUTPUT
@Hp4396;"*rst"
70
!
80
"
ENTER
SOURCE
FILE
NAME
ON
CONTROLLER
?
";
90
INPUT
Src_file$
100
Src_file$
110
!
120
"
ENTER
SOURCE
FILE
SIZE
?
";
130
INPUT
Src_size
140
Src_size
150
!
160
"
ENTER
DESTINATION
FILE
NAME
ON
INSTRUMENT
?
";
170
INPUT
Dst_file$
180
Dst_file$
190
!
200
Copy_to_instr(@Hp4396,Src_file$,Src_size,Dst_file$)
210
!
220
END
230
!
240
!
copy_to_instrument
250
!
260
SUB
Copy_to_instr(@Hp4396,Src_file$,Src_size,Dst_file$)
270
DIM
Img$[32]
280
Max_bsize=16384
290
!
300
ASSIGN
@Src_file
TO
Src_file$
310
!
320
CLEAR
@Hp4396
330
OUTPUT
@Hp4396;"CLES"
340
OUTPUT
@Hp4396;"WOPEN
""";Dst_file$;""""
350
IF
FNCheck_error(@Hp4396,"
<CPTI:
wopen>")=-1
THEN
SUBEXIT
360
Xfr_done=0
370
!
380
LOOP
390
SELECT
(Src_size-Xfr_done)
400
CASE
>Max_bsize
410
Block_size=Max_bsize
420
CASE
0
430
ASSIGN
@Src_file
TO
*
440
OUTPUT
@Hp4396;"CLOSE"
450
SUBEXIT
460
CASE
ELSE
470
Block_size=(Src_size-Xfr_done)
Figure
11-9.
Sample
Program:
File
Transfer
from
External
Controller
to
4396B
(1/2)
Using
Application
Programs
11-13