This functionality is only available for certain module packages. Info / Copyright

You are here: Designer > Configuration variables > Configuration variables: Basics

Configuration variables: Basics

A configuration variable is a superior variable that is referenced with a macro variable. This is done by means of a simple formula. This allows you to define manifold dependencies.

You can use formulas to calculate the following values:

Configuration variables are displayed as an additional input field to the engineer in the Project Builder. Use configuration variables if you want to give the engineer the possibility to define references. During the generation of the project documentation the value of the reference is replaced by the value of the configuration variable.

The following variable types are available:

Variable type Meaning Example
Integer Integer values 1, 2, 3
Double Floating-point number 3.456
StringA string is any string of characters that can consist of letters and numbers. String EPLAN
Boolean Two possible states true or false

The following operators can be used in the formula:

Operator Meaning Valid for Example
+,-,*,/ Arithmetic calculation Integer, double =V1*V2
'...' Literal String ='EPLAN'
+ Linking of strings String ='EPLAN'+'efficient engineering'
==, !=, <, <=, >,>= Comparison operators Integer, double =V1<=V2
not, and, or, xor Logic operators Boolean =(V1<=V2) and (V1>=V3)
&&, || Alternative notation for logic operators and and or Boolean =(V1<=V2) && (V1>=V3)
if Condition then Value1 else Value2 endif

or

Condition ? Value1 : Value2
Conditional values All =if V1==0 then V2 else V3 endif

or

=V1==0?V2:V3

Tip

You are supported by the software when entering a formula. As soon as you have entered the "equals" sign, all the available configuration variables and their displayed names are displayed in a drop-down list. You can activate the functionality at any time by using the shortcut key Ctrl + Spacebar. The list is filtered automatically during entry.

If predefined values exist for a configuration variable, these values are displayed as soon as you have entered the operators == or !=.

Example:

=V1== pre-defined value

or

=V1!= pre-defined value

Notes

  • Every formula must begin with an "equals" sign, for example =F206.
  • You can use configuration variables in Macro-Typicals and Typical-Groups. The procedure is the same.
  • The use of brackets in a formula follows the general mathematical rules. Expressions in brackets are calculated first and the result then processed further.

We would like to learn from you. In order to improve the help system continuously, we are documenting your behavior with Google Analytics (Additional information & opt-out).