Agilent Technologies 4294A Service Manual Page 240

  • Download
  • Add to my manuals
  • Print
  • Page
    / 518
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 239
240 13
Application Sample Programs
File Transfer Function
File Transfer from 4294A to External Controller
This program transfers a specified file in the current directory (RAM disk in the sample
program of
Example 13-7 ) of the 4294A to the current directory of the storage device (A
drive in the sample program of Example 13-7 ) connected to the external controller, giving
a file name you desire.
When executed, this program first prompts you to enter a source file name, as shown
below. Enter the name of a file you want to transfer.
ENTER SOURCE FILE NAME ON INSTRUMENT ?
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 file name you
want to give on the storage device. Note that a file with the same name will be overwritten,
if it already exists.
ENTER SOURCE FILE NAME ON INSTRUMENT ? SAMPLE.STA
ENTER DESTINATION FILE NAME ON CONTROLLER ?
Example 13-7 Sample Program: File Transfer from 4294A to External Controller
10 !
20 ! File transfer (Instrument -> Controller)
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 INSTRUMENT ? ";
120 INPUT Src_file$
130 PRINT Src_file$
140 !
150 PRINT " ENTER DESTINATION FILE NAME ON CONTROLLER ? ";
160 INPUT Dst_file$
170 PRINT Dst_file$
180 !
190 Copy_from_instr(@Agt4294,Src_file$,Dst_file$)
200 !
210 END
220 !
230 ! copy_from_instrument
240 !
250 SUB Copy_from_instr(@Agt4294,Src_file$,Dst_file$)
260 DIM Len$[6],Img$[32],Dmy$[2]
270 !
280 ON ERROR GOTO Skip_purge
290 PURGE Dst_file$
300 Skip_purge: OFF ERROR
310 CREATE Dst_file$,1
320 ASSIGN @Dst_file TO Dst_file$
330 !
340 CLEAR @Agt4294
350 OUTPUT @Agt4294;"CLES"
360 OUTPUT @Agt4294;"ROPEN """;Src_file$;""""
370 IF FNCheck_error(@Agt4294,"<CPFI: ropen>")=-1 THEN SUBEXIT
Page view 239
1 2 ... 235 236 237 238 239 240 241 242 243 244 245 ... 517 518

Comments to this Manuals

No comments