Macro Setup Dialog

The dialog Macro Setup is divided into three functional areas that are described in details in the following sections.

Macro Setup dialog.

Area 1: List of defined macros

param

Machine Type

This drop-down menu provides a list of defined machine types you can select from (e.g. ISO Milling, ISO Turning, Heidenhain, etc.).

param

Macro group

This drop-down menu provides a list of defined macro groups.

To create, rename or delete a macro group, click on the Edit Macro Groups icon at the right on this field.

Edit Macro Groups dialog.

Macro name

Here you can see all available macros for the selected machine type and macro group.

param

Add

Click this button to open the dialog Add macro. Enter the name of the new macro and click OK. The new macro is added right after the selected macro in the Macro name list.

param

Rename

Click this button to rename the selected macro.

param

Copy

Click this button to make a copy of the selected macro.

You can make a few changes in the name and the contents of the macro to create a similar macro and save it.

param

Delete

Click this button to delete the selected macro.

It will display a confirmation message asking if you really want to delete the selected macro. If you answer Yes, the macro name and its contents will be deleted.

param

Copy To

Click this button to copy the selected macro to a different configuration.

The Copy Macros dialog will allow you to copy several macros at a time (check boxes at the left of the macro name) to the specified target Machine Type and Macro Group.

Copy Macros dialog.

param

Move To

Click this button to move the selected macro to a different configuration.

The functionality is similar to the Copy To button, but the selected macros are deleted from the original Machine Type and Macro Group.

param

Up / Down arrows

Use these buttons to move the selected macro up or down the list.

param

Favorite

Use this button to favorite or un-favorite a macro.

When a macro is favored (start is glowing) it will show in the Favorites group. The favorite macro will show group name and macro name in the format: {group}->{macro}.

Pressing the Favorite button when the favorite already exists will remove the favorite.

Area 2: Macro structure

param

Macro definition

Use the text entry field to the right to specify the contents of the macro.

A macro can contain both user and system variables. User variables are specified with a '$' character followed by a number, and system variables are specified with a '$' followed by the variable name.

In the field Macro definition, the macro block sequence is shown as it will appear in the NC program. NC code variables are replaced by parameters in ascending order. These parameters will be added to the macro program using the button Add (data input via the keyboard is not permitted and will not be accepted!). You can use the same variable multiple times in a macro.

To add a block number to a line, specify a '#' at the beginning of the line. If you need to insert a character right after a variable, you must insert a '|' (vertical bar) after the variable. If a macro must start on a new line, make the first line of the macro definition blank.

Example: To insert the user variable 2 followed by 100, specify $2|100'.

Example: The macro Tool change consists of 9 NC program blocks with 8 parameters ($1 ... $8). The block number format (e.g. N0100) and interval (e.g. 10) can be configured and modified in the dialog Setup Block Numbers.

Example of Macro definition with 8 parameters.

param

Info variable

Use this drop-down menu to select the additional information that will be added to the macro when clicking the Add Info button (for example: date, time, date and time, filename, etc.).

param

Add Info

Click this button to insert a new information variable (selected in the Info variable drop-down list).

param

Add Formula

Click this button to insert a new formula.

Formulas are specified with a '@' character followed by two brackets where you need to insert the desired formula.

Example: @3{sqrt($1*$1 + $2*$2)}

Please refer to Formulas in Macros for further information.

param

Add User Input

Click this button to insert a new user variable.

param

User Input Order

Click this button to arrange the order of user input variables when adding the macro. This does not change the order of the variables when the macro is inserted in the NC file.

When you click this button, the following window appears:

The User input order dialog.

Use the up/down arrows to change the order of the parameters.

param

Description

Use this field to specify a description of the selected parameter.

When you insert the macro into the CNC program by clicking the icon , a parameter input box appears to let you enter all macro parameters. The description of the parameter is right next to the parameter field.

Macro parameter input fields (example).

param

Prefix

Use this field to specify a prefix string for the selected parameter, e.g. S for spindle speed.

param

Suffix

Use this field to specify a suffix string for the selected parameter.

param

Decimals

Use this field to specify the number of decimal digits.

param

Digits

Use this field to specify the number of digits. E.g. when inserting an O-number with 4 digits, the result becomes 'O0007'.

param

Min

Use this field to specify a minimum value for the selected parameter. If you enter a value lower than the Min value, you will immediately be prompted for correction.

Error message for value lower than Min.

param

Max

Use this field to specify a maximum value for the selected parameter. If you enter a value higher than the Max value, you will immediately be prompted for correction.

param

Default value

Use this field to specify a default value for the selected parameter.

param

Predefined values

Select this option if this macro parameter can only be one of a limited number of values.

Click the button Configure choices to enter the specific values the user can choose from when inserting this macro parameter.

Predefined values setup dialog.

This dialog shows the list of values that will be available to select for the user when inserting the macro.

If Label is left blank, it will be automatically filled with the value. Double-click a Label-Value pair to edit it. The pairs will appear in the combo-box in the same order as in this window with the top one selected as default.

param

Macro illustration / Parameter illustration

Use this field to specify the picture shown in the Add Macro dialog.

Click the Select Picture button to select the desired picture for the macro/parameter, and the No Picture button to remove any entered picture.

param

Macro attachment

Setting an attachment for a macro shows a button in the Add Macro dialog which, when pressed, will open the attachment to the macro.

This can be used to associate a detailed help file to a macro for ready availability from the Add Macro interface.

Click the Select attachment button to select an attachment for the macro, and the Clear attachment button to remove any entered file.

Area 3: Parameter monitoring / Additional options

Use the check boxes to enable or disable additional options.

The additional options must be selected carefully, as they affect the final result.

param

Parameter is required

Check this field if the user is required to specify a value for the selected parameter.

If you do not check this box, the sign * will appear in the parameter input field, indicating that this parameter is optional. In this case, you do not need to enter a value in the field. If you do it anyway, you will change the (modal) value for this NC code.

Optional Parameters can for example be found at the 3 axes (X, Y, Z) of linear move (G01).

param

Insert with sign

Check this field if the parameter value should be inserted with a sign.

Example: The value 123.4 will be inserted as +123.4.

param

Allow negative values

Check this field to allow negative values for the current parameter.

If you leave this field unchecked, only positive values will be accepted!

If you (accidentally) enter a negative value into the macro fields, the (-) sign will be ignored. The entered value will be considered as the absolute value of the parameter and will output positive NC codes in the CNC program.

param

Do not insert empty lines

Check this field if no blank line should be inserted when this parameter is not specified.

param

Allow letters

Check this field to allow the user to enter text string.

According to ISO Convention, texts in the CNC program must be written in parentheses so they can be read on CNC machines. To prevent forgetting the brackets, these are generated automatically in CIMCO Edit V8 when the field Allow letters is checked. Besides, the input fields Min, Max, Decimals, Digits and the box Allow negative values are grayed out.

The parameter $2 in the macro Program Start and End can include programmers' initials, text strings, and special characters in parentheses.

Allow letters.

param

Remember value

Check this field if the last value entered for this parameter should be used the next time the macro is called.

Example: Let's assume you need to drill a blind hole into a special steel with three depths Z10, Z16 and Z20 at a defined location (X,Y). To achieve this, use the macro 'G81 Drilling cycle' and check the box Remember value for the parameters $1, $3, and $4. This way, those parameters will be automatically filled out with the previous settings for the blind hole machining. As we want to drill at different depths, we do not select Remember value for the parameter $2, which is the modal Z value of the operation. Since Remember value is not activated, the field $2 will be marked with an * and is initially empty.
If the drilling program was previously run and you now call the macro 'G81 Drilling cycle' by clicking the icon , you just need to enter the first desired Z-value 10 into the field Z coordinate (absolute) and click on OK. Repeat the macro command with the Z-values 16 and 20, all other fields will be automatically filled out with the previously used values. Then you will have your blind hole.

Remember value in macro G81.

param

Uppercase

If the option Allow letters is enabled and you want to write with capital letters, check this field to make the user input uppercase.

You must check this box if you want to use both lower and uppercase in the text.

param

Hide formula results (in entire macro)

When this field is checked, the results of NC-Assistant macro formulas are hidden.

Please refer to Formulas in Macros for more information.