Programmable file functions

Application

Programmable file functions enable management of files from within the NC program. Files can be opened, copied, relocated, and deleted. This allows, for example, opening a component drawing during the measuring process with a touch probe cycle.

Description of function

Opening a file with OPEN FILE

The OPEN FILE function allows you to open a file from within an NC program.

If you define OPEN FILE, the control continues the dialog and you can program a STOP.

Using this function, the control can open all file types that you can open manually.

File types

The control opens the file in the HEROS tool last used for this file type. If you have never opened a file of a certain file type and multiple HEROS tools are available, the control will interrupt program run and open the Application? window. In the Application? window, you can select the HEROS tool the control should use to open the file. The control saves this selection.

Multiple HEROS tools are available for opening the following file types:

  • CFG
  • SVG
  • BMP
  • GIF
  • JPG/JPEG
  • PNG
 
Tip

In order to avoid program run interruptions or having to select an alternative HEROS tool, open a file of the corresponding file type once in the file manager. If the files of a certain file type can be opened in multiple HEROS tools, you can use the file manager to select the HEROS tool to be used for opening files of this file type.

File management

Input

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

11 OPEN FILE "FILE1.PDF" STOP

To navigate to this function:

Insert NC function All functions Selection OPEN FILE

The NC function includes the following syntax elements:

Syntax element

Meaning

OPEN FILE

Syntax initiator for the OPEN FILE function

File or QS

Path of the file to be opened

Fixed or variable path

Selection by means of a selection window

STOP

Interrupts the program run or simulation

Optional syntax element

Copying, moving and deleting files with FUNCTION FILE

The control offers the functions below for copying, moving and deleting files from an NC program:

NC function

Description

FUNCTION FILE COPY

This function copies a file into a target file. The control substitutes the content of the target file.

This function requires specifying the path to both files.

FUNCTION FILE MOVE

This function moves a file to a target file. The control substitutes the content of the target file and deletes the file to be moved.

This function requires specifying the path to both files.

FUNCTION FILE DELETE

This function deletes the selected file.

This function requires specifying the path to the file to be deleted.

Input

Copying a file

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

11 FUNCTION FILE COPY "FILE1.PDF" TO "FILE2.PDF"

; Copy the file from the NC program

To navigate to this function:

Insert NC function All functions Special functions Functions File functions FILE FUNCTION FILE COPY

The NC function includes the following syntax elements:

Syntax element

Meaning

FUNCTION FILE COPY

Syntax initiator for the Open file function

File or QS

Path of the file to be copied

Fixed or variable path

Selection by means of a selection window

TO File or QS

Path of the file to be substituted

Fixed or variable path

Selection by means of a selection window

Moving a file

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

11 FUNCTION FILE MOVE "FILE1.PDF" TO "FILE2.PDF"

; Move the file from the NC program

To navigate to this function:

Insert NC function All functions Special functions Functions File functions FILE FUNCTION FILE MOVE

The NC function includes the following syntax elements:

Syntax element

Meaning

FUNCTION FILE MOVE

Syntax initiator for the Move file function

File or QS

Path of the file to be relocated

Fixed or variable path

Selection by means of a selection window

TO File or QS

Path of the file to be substituted

Fixed or variable path

Selection by means of a selection window

Deleting a file

NC programs contained in this User's Manual are suggestions for solutions. The NC programs or individual NC blocks must be adapted before being used on a machine.

Change the following contents as needed:

  • Tools
  • Cutting parameters
  • Feed rates
  • Clearance height or safe position
  • Machine-specific positions (e.g., with M91)
  • Paths of program calls

Some NC programs depend on the machine kinematics. Adapt these NC programs to your machine kinematics before the first test run.

In addition, test the NC programs using the simulation before the actual program run.

 
Tip

With a program test you determine whether the NC program can be used with the available software options, the active machine kinematics and the current machine configuration.

11 FUNCTION FILE DELETE "FILE1.PDF"

; Delete the file from the NC program

To navigate to this function:

Insert NC function All functions Special functions Functions File functions FILE FUNCTION FILE DELETE

The NC function includes the following syntax elements:

Syntax element

Meaning

FUNCTION FILE DELETE

Syntax initiator for the Delete file function

File or QS

Path of the file to be deleted

Fixed or variable path

Selection by means of a selection window

Notes

 
Notice
Caution: Data may be lost!
When deleting a file with the FUNCTION FILE DELETE function, the control will not put this file into the recycle bin. The control deletes the file once and for all!
  1. Use this function only with files that are no longer needed
  • There are various ways to select files:
      • Enter the file path
      • Select the file in a selection window
      • Define the file path or name of the subprogram in a QS parameter
      • If the called file is located in the same directory as the calling file, you may also enter just the file name.

  • When applying file functions relating to the calling NC program in a called NC program, the control will display an error message.
  • When intending to copy or move a non-existent file, the control displays an error message.
  • If the file to be deleted does not exist, the control does not display an error message.