Agilent Technologies 4294A Service Manual Page 244

  • Download
  • Add to my manuals
  • Print
  • Page
    / 518
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 243
244 13
Application Sample Programs
File Transfer Function
710 OUTPUT @Agt4294;"OUTPERRO?"
720 ENTER @Agt4294;Err_no,Err$
730 IF Err_no<>0 THEN
740 PRINT "ERROR: ";Str$;" ";Err$
750 RETURN -1
760 ELSE
770 RETURN 0
780 END IF
790 FNEND
Lines 80 to 90 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.
Lines 110 to 210 Accept the entry of the source file name and its size and the destination
file name.
Line 230 Calls the subprogram to transfer a file from the external controller to
the 4294A.
Lines 370 to 380 Prepare for writing the file to the destination storage device.
Lines 420 to 510 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.
Lines 560 to 570 Read data, whose amount is specified by the transfer data length, from
the source file.
Lines 590 to 600 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.
Lines 680 to 790 Provide a function to check that no error has occurred in the 4294A.
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 ! File list
30 !
40 ASSIGN @Agt4294 TO 717
50 OUTPUT @Agt4294;"*rst"
60 !
Page view 243
1 2 ... 239 240 241 242 243 244 245 246 247 248 249 ... 517 518

Comments to this Manuals

No comments