
242
13
Application Sample Programs
File Transfer Function
Figure 16-7 on page 407 to obtain the length of the data to be
transferred.
Lines 450 to 500 Check the data length. If the data length is 0, the transfer process is
terminated.
Lines 530 to 550 Adjusts the format and reads the data part.
Line 560
Writes the data to the destination file. The maximum length of data
transferred at a time is 16 Kbytes. Therefore, if the size of the source
file is greater than 16 Kbytes, the transfer routine, lines 400 to 590, is
repeated until transferring all of the data is completed.
Lines 650 to 760 Provide a function to check that no error has occurred in the 4294A.
File Transfer from External Controller to 4294A
This program transfers a specified file in the current directory of the storage device (A
drive in the sample program of Example 13-8 ) connected to the external controller to the
current directory of the selected storage device (RAM disk in the sample program of
Example 13-8 ) of the 4294A, giving a file name you desire.
This program, when executed, first prompts you to enter a source file name, as shown
below. Enter the name of a file you want to transfer. Note that the file name of the LIF
format can be distinguished between capital and small letters.
ENTER SOURCE FILE NAME ON CONTROLLER ?
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 size correctly
in bytes.
ENTER SOURCE FILE NAME ON CONTROLLER ? SAMPLE.STA
ENTER SOURCE FILE SIZE ?
Then, the program prompts you to enter the destination file name, as shown below (in this
example, the size of SAMPLE.STA is 12288 bytes). Enter the file name you want to give
on the destination storage device. Note that a file with the same name will be overwritten,
if it already exists.
ENTER SOURCE FILE NAME ON CONTROLLER ? SAMPLE.STA
ENTER SOURCE FILE SIZE ? 12288
ENTER DESTINATION FILE NAME ON INSTRUMENT ?
Example 13-8
Sample Program: File Transfer from External Controller to 4294A
10 !
20 ! File transfer (Controller -> Instrument)
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 CONTROLLER ? ";
120 INPUT Src_file$
130 PRINT Src_file$
140 !
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 ...