Managing Files

Other topics about Saving and Recalling

Various Commands

Creating directory (folder)

To create a directory (folder), use the following command:

:MMEMory:MDIRectory

Deleting file (directory)

To delete a file or a directory, use the following command:

:MMEMory:DELete

Copying file

To copy a file, use the following command:

:MMEMory:COPY

Transferring files

File transfer from the external controller to the E5052B can be possible by reading data from a file on the controller and then writing them to the file on the E5052B.

:MMEMory:DATA

Also, file transfer from the E5052B to the external controller can be possible by reading data from a file on the E5052B using the commands as query and then writing them to the file on the controller.

Retrieving data from storage

To retrieve information for the storage that is built in the E5052B (usage, property of file located in a specified directory), use the following command;

:MMEMory:CATAlog

Sample Program

The following example shows a sample program for transferring files between the external controller and the E5052B.This program reads out data from a specified file on the E5052B and then writes them to a specified file on the external controller.

Sample of file transfer

1000 DIM Src_file$[50],Dst_file$[50]

1010 DIM Buff$[9],Img$[32],Src_size_char$[10]

1020 INTEGER Max_bsize,Block_size

1030 REAL Src_size

1040 ASSIGN @Agte5052 TO 717

1050 Src_file$="f:\state01.sta"

1060 Dst_file$="a:state01.sta"

1070 CREATE Dst_file$,1

1080 ASSIGN @Dst_file TO Dst_file$

1090 Max_bsize=24576

1100 PRINT "Now Copying: "&Src_file$&"(@E5052) ->

"&Dst_file$&"(@Controller)"

1110 OUTPUT @Agte5052;":MMEM:DATA? """&Src_file$&""""

1120 WAIT .5

1130 ENTER @Agte5052 USING "#,A";Buff$

1140 ENTER @Agte5052 USING "#,A";Digit$

1150 Img$="#, "&Digit$&"A"

1160 ENTER @Agte5052 USING Img$;Src_size_char$

1170 Src_size=VAL(Src_size_char$)

1180 WHILE Src_size>0

1190 IF Src_size>Max_bsize THEN

1200 Block_size=Max_bsize

1210 ELSE

1220 Block_size=Src_size

1230 END IF

1240 ALLOCATE Dat$[Block_size]

1250 Img$="#, "&VAL$(Block_size)&"A"

1260 ENTER @Agte5052 USING Img$;Dat$

1270 OUTPUT @Dst_file USING Img$;Dat$

1280 DEALLOCATE Dat$

1290 Src_size=Src_size-Block_size

1300 END WHILE

1310 PRINT "Done"

1320 ENTER @Agte5052 USING "#,A";Buff$

1330 ASSIGN @Dst_file TO *