Rockwell Automation 8520-9API 9/Series OCI API Developer's Guide User Manual

Page 150

Advertising
background image

5–39

OCI Data Server CNC Commands

Publication 8520-6.6 - August 1999

The filename string format is given on page 6–19 and includes
specific directory information. Format for the arguments is source
filename followed by destination filename.

For example:

[COPY_PART_PROGRAM(”MAIND:SOURCE.PPG”, “PROTD:DEST.PPG”)]

copies the program named SOURCE.PPG from the main CNC
directory, to a programmed named DEST.PPG in the protected CNC
directory.

COPY_MEM_TO_MEM (`src_filename_string",

dest_filename_string", mode)

This command is used to copy a part program that already exists in
one of the directories in control memory (protected or main).

The filename string format is given on page 6–19. For example: and
includes specific directory information. You can not use this
command as a method of moving files from control memory to the
PC hard drive. Use the COPY_PART_PROGRAM command to
copy across devices. Format for the arguments is source filename
followed by destination filename.

The remaining argument with this command is the mode argument
which is an enumeration used to identify that you want to perform
the copy or test the command syntax. The test option will check the
command syntax (including the existence of the source program).
The enumeration for the mode argument is as follows:

Enumeration

Result:

0

test mode

1

execute copy

For example:

[COPY_MEM_TO_MEM (“MAIND

:SOURCE.PPG”, “MAIND:DESTINATION .PPG”,1)]

creates a new part program named DESTINATION.PPG in the
MAIND of the CNC that is a duplicate of the program named
SOURCE.PPG.

The destination file should not exist when you execute this
command. If it does the control will overwrite the previously
existing destination part program.

Advertising