Agilent Technologies 4294A Service Manual Page 242

  • Download
  • Add to my manuals
  • Print
  • Page
    / 518
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 241
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 !
Page view 241
1 2 ... 237 238 239 240 241 242 243 244 245 246 247 ... 517 518

Comments to this Manuals

No comments