Initialisation at CNC start (P-EXTV-00013)

P-EXTV-00013

Initialisation of external variables with default values

Description

This parameter can assign initial values to external variables at controller start-up. The controller only evaluates this parameter at start-up after the memory layout of the external variables is defined.

Behind the keyword init, the CNC expects a syntax string conforming to an NC program with value assignment to an external variable (see [PROG//13-Variables and calculation of variables]). The keyword init may be used several times in the configuration file of the external variables. The initial instructions are processed in the sequence in which they occur in the configuration file.

In the value assignment it is possible to use arithmetic operations, string operations and other external variables. All other decoder variables and instructions are not permissible.

Parameter

init

Data type

STRING

Data range

Syntax string conforming to the NC program with value assignment to an external variable.

Dimension

----

Default value

-

Remarks

This parameter is available as of CNC Builds 2.11.2027.01, V.2.11.2807.18 or V3.1.3052.01 and higher.

Attention

attention

The initialisation values of the external variables P-EXTV-00013 are only evaluated at controller start-up. The values are not adopted if an external variable list is reloaded.

Example of the initialisation of ext. Variables at controller start-up:

init      V.E.var1_real64 = 1234.5

init      V.E.var1_sgn32 = ROUND[1 + 10 / 3]

init      V.E.var1_string = “Hello“ + “ world!“

init      V.E.var2_real64 = 2.0 * V.E.var1_real64

init      V.E.arr_sgn32[0] = 1

init      V.E.arr_sgn32[1] = 2

init      V.E.vector.x = 10.0

init      V.E.vector.y = 20.0

init      V.E.vector.z = 30.0