Basics

Application

You can use the Q, QL, QR, QS and named parameters of the control, also referred to as variables, to take measurement results into account dynamically within calculations while machining.

For instance, you can program the following syntax elements variably:

  • Coordinate values
  • Feed rates
  • Spindle speeds
  • Cycle data

This means that the same NC program can be used for different workpieces and values have to be changed in only one central place.

Description of function

Variables are composed of the variable name and the variable value.

The control provides the following types of variables:

Variable type

Category

Example

Further information

Q parameters

Numerical parameter

Q10 = +10

QL parameters

Numerical parameter

QL10 = +10

QR parameters

Numerical parameter

QR10 = +10

QS parameters

String parameters

QS10 = "123"

Named parameters

Numerical parameter

or

String parameters

{DEPTH} = -10

or

{TOOL} = "MILL_D8"

Variable name

The control displays the variable name to the left of the equal sign.

For the different variable types, the variable name is as follows:

Variable

Contents

Q, QL, QR or QS parameters

The variable name of these parameters consists of letters and numbers (e.g., Q10 or QS10).

The control defines the letters for the variable type.

Named parameter

The variable name of named parameters consists of a freely chosen designation enclosed in curly brackets (e.g., {DEPTH_1}).

The variable name can include letters, numbers and underscores, but it must start with a letter.

For named parameters you can define a variable name with up to 31 characters.

Variable value

The control shows the variable value to the right of the equal sign.

The possible variable value differs as follows, depending on the category:

Category

Contents

Numerical parameter

Numerical parameters can be assigned a variable value between -999 999 999 and +999 999 999.

The input range is limited to no more than 16 characters; up to nine of these characters can precede the comma. The control can calculate numbers up to a magnitude of 1010.

String parameters

String parameters can be assigned a variable value of up to 255 characters.

The control displays the variable values of string parameters in quotation marks (e.g., "TOOL_3").

The following characters are allowed in the variable value of string parameters:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 ; ! # $ % & ' ( ) + , - . / : < = > ? @ [ ] ^ _ ` *

 
Tip

The control provides the FMT syntax element for QS parameters and named parameters to define format strings. Using format strings, you no longer have to convert numerical values or concatenate strings.

Format strings

Q parameters

Q parameters affect all NC programs in the control’s memory.

Q and QS parameters between 0 and 99 have a local effect in macros and cycles. This means that the control will not return changes to the NC program.

The control provides the following Q parameters:

Variable range

Meaning

0 to 99

User-defined Q parameters, if there are no overlaps with the HEIDENHAIN SL cycles

100 to 199

Q parameters for special functions on the control that can be read by user-defined NC programs or by cycles

200 to 1199

Q parameters for functions defined by HEIDENHAIN (e.g., cycles)

1200 to 1599

Q parameters for functions defined by the machine manufacturer (e.g., cycles)

1600 to 1999

User-defined Q parameters

QL parameters

QL parameters are active locally within an NC program.

The control provides the following QL parameters:

Variable range

Meaning

0 to 499

User-defined QL parameters

QR parameters

QR parameters affect all NC programs in the control’s memory; they are retained even after a restart of the control.

The control provides the following QR parameters:

Variable range

Meaning

0 to 99

User-defined QR parameters

100 to 199

QR parameters for functions defined by HEIDENHAIN (e.g., cycles)

200 to 499

QR parameters for functions defined by the machine manufacturer (e.g., cycles)

QS parameters

QS parameters affect all NC programs in the control’s memory.

QS parameters between 0 and 99 have a local effect within macros and cycles. This means that the control will not return changes to the NC program.

The control provides the following QS parameters:

Variable range

Meaning

0 to 99

User-defined QS parameters, if there are no overlaps with the HEIDENHAIN cycles

100 to 199

QS parameters for special functions on the control that can be read by user-defined NC programs or by cycles

200 to 1199

QS parameters for functions defined by HEIDENHAIN (e.g., cycles)

1200 to 1399

QS parameters for functions defined by the machine manufacturer (e.g., cycles)

1400 to 1999

User-defined QS parameters

Named parameter

Named parameters, just like QL parameters, take effect locally in the NC program.

You can define named parameters as numerical parameters or as string parameters.

Notes

 
Notice
Danger of collision!
HEIDENHAIN cycles, machine manufacturer cycles and third-party functions use variables. You can also program variables within NC programs. Using variables outside the recommended ranges can lead to intersections and thus, undesired behavior. Danger of collision during machining!
  1. Only use variable ranges recommended by HEIDENHAIN
  2. Do not use pre-assigned variables
  3. Comply with the documentation from HEIDENHAIN, the machine manufacturer and third-party providers
  4. Check the machining sequence using the simulation
 
Notice
Caution: Significant property damage!
Undefined fields in the preset table behave differently from fields defined with the value 0: Fields defined with the value 0 overwrite the previous value when activated, whereas with undefined fields the previous value is kept. If the previous value is kept, there is a danger of collision!
  1. Before activating a preset, check whether all columns contain values.
  2. For undefined columns, enter values (e.g., 0)
  3. As an alternative, have the machine manufacturer define 0 as the default value for the columns

Preassigned Q parameters

  • You can enter fixed and variable values mixed in the NC program.
  • You can use the Q key to create an NC block to assign a value to a variable. If you press the key again, the control changes the variable type in the order Q, QL, QR.
  • On the virtual keyboard, this procedure only works with the Q key in the NC functions area.

  • Virtual keyboard of the control bar

  • With the SET UNDEFINED syntax element you assign the undefined status to the variables.
  • For example, if you program a position using an undefined Q parameter, the control will ignore this movement.

  • If you use an undefined variable in arithmetic operations in the NC program, the control displays an error message and stops program run.

  • Assigning the Undefined status to a variable

  • The control saves numerical values internally in a binary number format (standard IEEE 754). Due to the standardized format used, some decimal numbers cannot be represented with a binary value that is 100% exact (rounding error).
  • If you use calculated variable values for jump commands or positioning moves, you must keep this in mind.

  • For each variable type, you can define the variable range or variables that the control will display on the QPARA tab of the Status workspace.
  • Defining the contents of the QPARA tab

Notes on QR parameters and backup

The control saves QR parameters within a backup.

If the machine manufacturer did not define a specific path, the control saves the QR parameters in the following path: SYS:\runtime\sys.cfg. The SYS: partition will only be backed up in full backups.

Machine manufacturers can use the following optional machine parameters to specify the paths:

  • pathNcQR (no. 131201)
  • pathSimQR (no. 131202)

If the machine manufacturer used the optional machine parameters to specify a path on the TNC: partition, you can perform a backup with the NC/PLC Backup functions without entering a code number.

Backup and restore