Displaying List Of Files In Current Directory - Agilent Technologies 4294A Programming Manual

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

Advertisement

Application Sample Programs
File Transfer Function
710
720
730
740
750
760
770
780
790
Lines 80 to 90
Lines 110 to 210
Line 230
Lines 370 to 380
Lines 420 to 510
Lines 560 to 570
Lines 590 to 600
Lines 680 to 790
NOTE
To transfer a file from the external storage device to the 4294A, you must check the file
size (number of bytes) in advance .

Displaying List of Files in Current Directory

This program displays the list of the files in the current directory.
Example 13-9
Sample Program: Displaying List of Files in Current Directory of 4294A
10
20
30
40
50
60
244
OUTPUT @Agt4294;"OUTPERRO?"
ENTER @Agt4294;Err_no,Err$
IF Err_no<>0 THEN
PRINT "ERROR: ";Str$;"
RETURN -1
ELSE
RETURN 0
END IF
FNEND
Set the current directory of the external controller to A drive and sets
the current directory of the 4294A to the RAM disk. You can set the
current directory of the 4294A to the internal flexible disk using the
STODDISK command. The A drive in the external controller may not
be detected under a certain environment of the external controller, so
change the drive depending on the situation.
Accept the entry of the source file name and its size and the destination
file name.
Calls the subprogram to transfer a file from the external controller to
the 4294A.
Prepare for writing the file to the destination storage device.
Calculate the length of the data that has not been transferred based on
the source file size previously entered and the length of the data that
has been already transferred. If the length of the remaining data does
not exceed 16 Kbytes, it is set as the transfer data length; otherwise, 16
Kbytes is set as the transfer data length. Note that, if the length of the
data not transferred is 0 at this time, the transfer process is terminated.
Read data, whose amount is specified by the transfer data length, from
the source file.
Write data to the destination file in the fixed length block format (see
Figure 16-7 on page 407). 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 420 to 620, is repeated until
transferring all of the data is completed.
Provide a function to check that no error has occurred in the 4294A.
!
! File list
!
ASSIGN @Agt4294 TO 717
OUTPUT @Agt4294;"*rst"
!
";Err$
13

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents