Agilent Technologies 4396B Gpib Programming Manual page 86

Network/spectrum/impedance analyzer
Hide thumbs Also See for 4396B:
Table of Contents

Advertisement

c
Figure 11-8. Sample Program: File Transfer from External Controller to 4396B (2/2)
Lines 80 to 180 accept the entry of the source le name and its size and the destination le
name.
Line 200 calls the subprogram to transfer a le from the external controller to the 4396B.
Lines 340 to 350 prepare for writing the le to the destination storage device.
Lines 390 to 480 calculate the length of the data that has not been transferred based on the
source le 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 530 to 540 read data, whose amount is speci ed by the transfer data length, from the
source le.
Lines 560 to 570 write data to the destination le in the xed length block format (see
Figure 11-8).
The maximum length of data transferred at a time is 16 Kbytes. Therefore, if the size of the
source le is greater than 16 Kbytes, the transfer routine, lines 390 to 590, is repeated until
transferring all of the data is completed.
Lines 650 to 750 provide a function to check that no error has occurred in the 4396B.
Note
To transfer a le from the external storage device to the 4396B, you must
check the le size (number of bytes) in advance .
11-14
Using Application Programs
b

Advertisement

Table of Contents
loading

Table of Contents