Programmable file functions enable management of files from within the NC program. Files can be opened, copied, relocated and deleted. This permits, for example, opening the drawing of a component during the measuring process with a touch probe cycle.
Application
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.
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
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.
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.
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 |
The NC function includes the following syntax elements:
Syntax element | Meaning |
---|---|
OPEN FILE | Start of syntax for the OPEN FILE function |
" " | Path of the file to be opened |
STOP | Interrupts the program run or simulation Optional syntax element |
Copying, relocating 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
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.
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 |
The NC function includes the following syntax elements:
Syntax element | Meaning |
---|---|
FUNCTION FILE COPY | Syntax initiator for the Open file function |
" " | Path of the file to be copied |
" " | Path of the file to be substituted |
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.
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 |
The NC function includes the following syntax elements:
Syntax element | Meaning |
---|---|
FUNCTION FILE MOVE | Syntax initiator for the Move file function |
" " | Path of the file to be relocated |
" " | Path of the file to be substituted |
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.
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 |
The NC function includes the following syntax elements:
Syntax element | Meaning |
---|---|
FUNCTION FILE DELETE | Syntax initiator for the Delete file function |
" " | Path of the file to be deleted |
Notes
- 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 select window
- Define the file path or name of the subprogram in a QS parameter
- 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.
If the called file is located in the same directory as the calling file, you may also enter just the file name.