Agilent Technologies 4294A Service Manual Page 241

  • Download
  • Add to my manuals
  • Print
  • Page
    / 518
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 240
13 241
Application Sample Programs
File Transfer Function
1. Chapter Title
2. Chapter Title 13. Application Sample
4. Chapter Title
5. Chapter Title
Programs
380 !
390 LOOP
400 OUTPUT @Agt4294;"READ?"
410 ENTER @Agt4294 USING "#,2A";Dmy$
420 ENTER @Agt4294 USING "#,6A";Len$
430 Block_size=VAL(Len$)
440 !
450 IF Block_size=0 THEN
460 ENTER @Agt4294 USING "%,A";Dmy$
470 ASSIGN @Dst_file TO *
480 OUTPUT @Agt4294;"CLOSE"
490 SUBEXIT
500 END IF
510 !
520 ALLOCATE Dat$[Block_size]
530 Img$="#,"&VAL$(Block_size)&"A"
540 ENTER @Agt4294 USING Img$;Dat$
550 ENTER @Agt4294 USING "%,A";Dmy$
560 OUTPUT @Dst_file USING Img$;Dat$
570 DEALLOCATE Dat$
580 !
590 IF FNCheck_error(@Agt4294,"<CPFI: block read>")=-1 THEN
SUBEXIT
600 END LOOP
610 SUBEND
620 !
630 ! Instrument Error Check
640 !
650 DEF FNCheck_error(@Agt4294,Str$)
660 DIM Err$[64]
670 INTEGER Err_no
680 OUTPUT @Agt4294;"OUTPERRO?"
690 ENTER @Agt4294;Err_no,Err$
700 IF Err_no<>0 THEN
710 PRINT "ERROR: ";Str$;" ";Err$
720 RETURN -1
730 ELSE
740 RETURN 0
750 END IF
760 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 170 Accept the entry of the source file name and the destination file name.
Line 190 Calls the subprogram to transfer a file from the 4294A to the external
controller.
Lines 280 to 320 Prepare for writing to the destination file.
Lines 340 to 370 Prepare for reading the source file to the external controller.
Line 400 Executes the query command to read data.
Lines 410 to 430 Read the part indicating the length of the fixed length block data (see
Page view 240
1 2 ... 236 237 238 239 240 241 242 243 244 245 246 ... 517 518

Comments to this Manuals

No comments