
13
243
Application Sample Programs
File Transfer Function
1. Ch
apter
T
itle
2.
Ch
ap
te
r
T
itl
e
1
3
. Application Sample
4
. Chap
te
r T
itle
5. Chap
te
r T
itle
Programs
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 Block_size=Max_bsize
450 CASE 0
460 ASSIGN @Src_file TO *
470 OUTPUT @Agt4294;"CLOSE"
480 SUBEXIT
490 CASE ELSE
500 Block_size=(Src_size-Xfr_done)
510 END SELECT
520 Xfr_done=XBlock_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
Summary of Contents for 4294A
Page 4: ...4 ...
Page 18: ...18 Contents ...
Page 24: ...24 Chapter1 To make effective use of this manual Other manuals attached to this unit ...
Page 94: ...94 Chapter6 Reading Writing Measurement Data Reading Writing Data ...
Page 110: ...110 Chapter7 Processing Measurement Results Analyzing Measurement Results ...
Page 136: ...136 Chapter10 Handling Errors Sample program for error handling ...
Page 246: ...246 13 Application Sample Programs File Transfer Function ...
Page 254: ...254 Chapter15 Setting the Display LCD Sample program for setting the LCD screen ...
Page 507: ...Index Index 507 Index ...
Page 508: ...508 Index Index ...
Page 509: ...Index Index 509 Index ...
Page 510: ...510 Index Index ...
Page 511: ...Index Index 511 Index ...
Page 512: ...512 Index Index ...
Page 513: ...Index Index 513 Index ...
Page 514: ...514 Index Index ...
Page 515: ...Index Index 515 Index ...
Page 516: ...516 Index Index ...
Page 517: ...Index Index 517 Index ...
Page 518: ...518 Index Index ...