
240
13
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.
ENTER SOURCE FILE NAME ON INSTRUMENT ?
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.
ENTER SOURCE FILE NAME ON INSTRUMENT ? SAMPLE.STA
ENTER DESTINATION FILE NAME ON CONTROLLER ?
Example 13-7
Sample Program: File Transfer from 4294A to External Controller
10 !
20 ! File transfer (Instrument -> Controller)
30 !
40 DIM Src_file$[50],Dst_file$[50]
50 ASSIGN @Agt4294 TO 717
60 OUTPUT @Agt4294;"*rst"
70 !
80 MASS STORAGE IS "a:\"
90 OUTPUT @Agt4294;"STOD MEMO"
100 !
110 PRINT " ENTER SOURCE FILE NAME ON INSTRUMENT ? ";
120 INPUT Src_file$
130 PRINT Src_file$
140 !
150 PRINT " ENTER DESTINATION FILE NAME ON CONTROLLER ? ";
160 INPUT Dst_file$
170 PRINT Dst_file$
180 !
190 Copy_from_instr(@Agt4294,Src_file$,Dst_file$)
200 !
210 END
220 !
230 ! copy_from_instrument
240 !
250 SUB Copy_from_instr(@Agt4294,Src_file$,Dst_file$)
260 DIM Len$[6],Img$[32],Dmy$[2]
270 !
280 ON ERROR GOTO Skip_purge
290 PURGE Dst_file$
300 Skip_purge: OFF ERROR
310 CREATE Dst_file$,1
320 ASSIGN @Dst_file TO Dst_file$
330 !
340 CLEAR @Agt4294
350 OUTPUT @Agt4294;"CLES"
360 OUTPUT @Agt4294;"ROPEN """;Src_file$;""""
370 IF FNCheck_error(@Agt4294,"<CPFI: ropen>")=-1 THEN SUBEXIT
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 ...