Agilent Technologies 4294A Programming Manual page 243

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

Advertisement

150
PRINT "
ENTER SOURCE FILE SIZE ?
160
INPUT Src_size
170
PRINT Src_size
180
!
190
PRINT "
ENTER DESTINATION FILE NAME ON INSTRUMENT ?
200
INPUT Dst_file$
210
PRINT Dst_file$
220
!
230
Copy_to_instr(@Agt4294,Src_file$,Src_size,Dst_file$)
240
!
250
END
260
!
270
!
copy_to_instrument
280
!
290
SUB Copy_to_instr(@Agt4294,Src_file$,Src_size,Dst_file$)
300
DIM Img$[32]
310
Max_bsize=16384
320
!
330
ASSIGN @Src_file TO Src_file$
340
!
350
CLEAR @Agt4294
360
OUTPUT @Agt4294;"CLES"
370
OUTPUT @Agt4294;"WOPEN """;Dst_file$;""""
380
IF FNCheck_error(@Agt4294," <CPTI: wopen>")=-1 THEN SUBEXIT
390
Xfr_done=0
400
!
410
LOOP
420
SELECT (Src_size-Xfr_done)
430
CASE >Max_bsize
440
450
CASE 0
460
470
480
490
CASE ELSE
500
510
END SELECT
520
Xfr_done=Xfr_done+Block_size
530
!
540
ALLOCATE Dat$[Block_size]
550
!
560
Img$="#,"&VAL$(Block_size)&"A"
570
ENTER @Src_file USING Img$;Dat$
580
!
590
Img$="8A,ZZZZZZ,"&VAL$(Block_size)&"A"
600
OUTPUT @Agt4294 USING Img$;"WRITE
#6",Block_size,Dat$,END
610
DEALLOCATE Dat$
620
IF FNCheck_error(@Agt4294," <CPTI: block write>")=-1
THEN SUBEXIT
630
END LOOP
640
SUBEND
650
!
660
!
Instrument Error Check
670
!
680
DEF FNCheck_error(@Agt4294,Str$)
690
DIM Err$[64]
700
INTEGER Err_no
13
Block_size=Max_bsize
ASSIGN @Src_file TO *
OUTPUT @Agt4294;"CLOSE"
SUBEXIT
Block_size=(Src_size-Xfr_done)
Application Sample Programs
File Transfer Function
";
";
243

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents