Program Format

This section describes how to use the Program Format functions to automatically extract NC programs comments, and depending on the configuration, fill them in the appropriate database fields. This function is active when adding programs manually or using the DNC Auto import option.

To configure Program Format, select Setup in the Administration menu, or click on the Setup dialog launch icon in the Database menu. Choose Program Format from the Machines menu in the left window of the NC-Base Configuration dialog. The following dialog appears:

The Program Format dialog.

Field Configuration

param

Machine

Select the machine group you wish to configure a program format for.

param

Database field

Select the database field you wish to configure from this list.

The following database fields can be selected: Program, Customer and Text field 1-9 (custom fields in Database Settings).

param

Extract from

Use this field to specify where the program information should be extracted from.

param

Enable trigger

Check this field to enable a trigger for the selected database field.

Please refer to Using Triggers for detailed information about triggers.

param

Use advanced trigger

Check this field to specify a trigger using the advanced trigger format.

Please refer to Using Advanced Triggers for detailed information about advanced triggers.

param

Start trigger

Use this field to specify the start trigger.

The server will look for the start trigger in the file, and when found, match all characters between the start trigger and end trigger.

param

End trigger

Use this field to specify the end trigger.

The server will look for the end trigger in the file, and when found, match all characters between the start trigger and end trigger.

param

Ignore

Use this field to specify any characters/strings/triggers that should be removed from the extracted value.

Example: If you specify '-' in this field, and the extracted value is MOULD-3, then the string MOULD3 will be inserted into the database.

param

Match number

Use this field to specify how many times the trigger should be matched, before the value is extracted.

If the trigger occurs only once in the file (i.e. each database field contains a trigger), specify 1.

param

Max length

Use this field to specify the maximum length of the value extracted.

Example: If you specify 4 in this field, and the extracted value is MOULD, only MOUL will be used.

param

Max lines

Use this field to specify how many lines should be scanned (starting from the top of the program).

Example: If you specify 10, and the trigger is not within the 10 first lines of the program, the value will not be found.

param

Global Change All Triggers

Click this button to change all triggers for the selected machine(s).

param

Global Change This Trigger

Click this button to change the current trigger for the selected machine(s).

Test trigger

param

Use this field to test your triggers. Copy the header of the corresponding NC program in the test field and test the above values to see if the correct content will be extracted.

Example: You can see in the Program Format dialog that the Start and End triggers are defined for the database field Program. We will test the following NC program, where the comment (P-ID 1234) should match the program name:

The string '(P-ID' is used as start trigger for the program name, and ')' is used as end trigger. The extracted program name 1234 is displayed in the field below the test field.

You can proceed in the same way to test more triggers.

param

Program

This field shows the result of the test program based on the parameters specified above.