You have opened a project. Tab Master data > Command group Plot frames / forms > Drop-down button Form > [Open].
- Tab Insert > Command group Text > Drop-down button Forms > Placeholder text. Select the Placement tab in the subsequent dialog and, next to the Properties formatted / calculated field, click [...]. Select the Calculation format element and click (Move to the right).
- You have double-clicked a placeholder text (or have selected the Properties popup menu item. In this case several texts can also be marked). Select the Placement tab in the subsequent dialog and, next to the Properties formatted / calculated field, click [...]. Select the Calculation format element and click (Move to the right).
You have opened a project. Tab Tools > Command group Management > Properties. You have created a user-defined property with the field type "Monolingual text" or "Value with unit" in the Configure properties dialog. You have selected the "Block property" entry in the Display type field and clicked the [...] button in the Block format field. Select the Calculation format element and click (Move to the right).
You have opened a project. You have opened the properties dialog for a function, a page, a symbol, or a project. You have selected the Block property: Format [n] property in the Properties field / Property name field / Properties tab and have clicked [...] in the Value column. Select the Calculation format element and click (Move to the right).
You have opened a project. Tab Pre-planning > Command group Edit > Configure segment definitions. Click [...] in the Display format navigator field. Select the Calculation format element and click (Move to the right).
In this dialog you can use format elements to compile a calculation formula. To this purpose project data as well as the parts data of the parts stored in the project are available in the form and plot frame editor. During the configuration of user-defined block properties only project data is offered since these properties are stored project-specifically. User-defined properties for the parts management or for part references cannot be defined as block properties. The data determined via the calculation formula can be displayed in the project or output in reports.
Overview of the main dialog elements:
This field shows all format elements that can be part of a calculation formula. To load a format element for the calculation formula into the Selected format elements field, select it and then click ( Move to the right).
The following format elements are available:
Format element |
Meaning |
---|---|
Placeholder text |
Opens the Placeholder texts - <Form type> dialog. Allows insertion of placeholder text into the calculation formula. |
|
Adds |
|
Subtracts |
|
Multiplies |
|
Divides |
|
Groups several format elements together with the format element ")". This defines the priority of calculation in the calculation formula. |
|
Groups several format elements together with the format element "(". This defines the priority of calculation in the calculation formula. |
Number |
Opens the dialog Format: Number. Allows entry of a constant number into the calculation formula. |
You wish to automatically calculate and output the total price of parts, including a discount:
Total purchase price * (100 - discount) : 100
You have already entered the discount percentage in the parts management in the tab Properties in the property Discount (command path: Tab Master data > Command group Parts > Management). Select the Calculation format element in the dialog Format: Property. Enter the following format elements in the specified sequence in the dialog Format: Calculation:
Format element |
Meaning |
---|---|
Placeholder text |
Select the Placeholder text format element and in the subsequent dialog select the Part reference data placeholder element with the Total purchase price Currency 1 property. |
* |
Select the "*" format element. |
( |
Select the "(" format element. |
Number |
Select the Number format element. Enter a value of "100". |
- |
Select the "-" format element. |
Placeholder text |
Select the Parts data format element and the Discount property. |
) |
Select the ")" format element. |
/ |
Select the "/" format element. |
Number |
Select the Number format element. Enter a value of "100". |
Available format elements in the user-defined properties / block properties
Format element |
Meaning |
---|---|
|
Adds |
|
Subtracts |
|
Multiplies |
|
Divides |
|
Exponentiated |
|
Groups several format elements together with the format element ")". This defines the priority of calculation in the calculation formula. |
|
Groups several format elements together with the format element "(". This defines the priority of calculation in the calculation formula. |
|
Allows a self-defined error text or a number to be displayed in the event of an error. This number can then be calculated further despite an error. The error text or the number are specified via a subsequent constant. For " |
Format element |
Meaning |
---|---|
|
Absolute value |
|
Arccosine |
|
Arcsine |
|
Arctangent |
|
Ceiling, returns the smallest integer greater than or equal to the specified decimal number. |
|
Cosine |
|
Hyperbolic cosine |
|
Exponential function |
|
Floor, rounding function, returns the largest integer less than or equal to the specified decimal number. |
|
Fractional part outputs the decimal places of a decimal number. If the decimal number is negative, the preceding sign is output as well. For example, the value "0.55" is output for the positive decimal number "1.55" and the value "-0.55" for the negative decimal number "-1.55". |
|
Natural logarithm |
|
Sine |
|
Hyperbolic sinus |
|
Root function (square root) |
|
Tangent |
|
Hyperbolic tangent |
Format element |
Meaning |
---|---|
|
Less than |
|
Less than or equal to |
|
Greater than |
|
Greater than or equal to |
|
Equal to |
|
Not equal to |
|
Comparison with regular expressions. Regular expressions conforming to the ECMA standard may be used in the subsequent constant. |
|
Comparison with placeholder characters. Placeholder characters may be used in the subsequent constant, just as they are used for searches in EPLAN (see Using Placeholders). |
Notes:
- The format elements "
= ", "> ", etc. compare an input value with a comparison value (constant). Depending on the type of the constant, the values are treated as numbers or as texts. - The format elements "
wildcard " and "regex " allow comparison operations of an input value with a complex comparison value. The input value and comparison value are always treated as text. - The "
wildcard " format element compares the complete character string in the comparison operation and allows the usage of the placeholder characters "*" and "?" in the comparison value. - The "
regex " format element searches for a partial string in the input value. The comparison value is described as a regular expression.
The comparison operators for series can be used to compare the entries in a semicolon-separated series of values with a specified comparison criterion.
Format element |
Meaning |
---|---|
|
Less than |
|
Less than or equal to |
|
Greater than |
|
Greater than or equal to |
|
Equal to |
|
Not equal to |
|
Comparison with regular expressions. Regular expressions conforming to the ECMA standard may be used in the subsequent constant. |
|
Comparison with placeholder characters. Placeholder characters may be used in the subsequent constant, just as they are used for searches in EPLAN (see Using Placeholders). |
Notes:
- The format elements "
;= ", ";> ", etc. compare an input value with a comparison value (constant). Depending on the type of the constant, the values are treated as numbers or as texts. - The format elements "
wildcard " and "regex " allow comparison operations of an input value with a complex comparison value. The input value and comparison value are always treated as text. - The "
wildcard " format element compares the complete character string in the comparison operation and allows the usage of the placeholder characters "*" and "?" in the comparison value. - The "
regex " format element searches for a partial string in the input value. The comparison value is described as a regular expression.
Format element |
Meaning |
---|---|
|
AND operation |
|
OR operation |
|
Exclusive OR (either or) |
|
Boolean value, binary value (true or false) |
|
NOT operation |
Format element |
Meaning |
---|---|
|
Quantity, counts values that are not equal to "0" (numerical value), are not equal to "0" or are "FALSE" (bool), are not equal to "0" or are empty (monolingual or multilingual string). |
|
Maximum |
|
Median value |
|
Minimum |
|
Sum, totals the values that are transferred separated by semicolons. |
Other format elements:
Format element |
Meaning |
---|---|
Property |
Opens the dialog Format: Property. Allows you to enter a property in the calculation formula. |
Constant |
Opens the dialog Format: Constant. Allows you to enter a constant number, a constant text or the circle constant π for the calculation formula. |
You want to determine the space requirement of a part from its width and height and take into account a space reserve of 5%:
(Width * Height) + ((Width * Height) * 5 : 100)
You have already entered the dimensions in the parts management in the Properties tab at the properties Width, Height and Depth (command path: Tab Master data > Command group Parts > Management).
You create a user-defined property with the assignment "Function", the field type "Value with unit" and the display type "Block property". Click [...] in the Block format field.
Select the Calculation format element in the dialog Format. Enter the following format elements in the specified sequence in the dialog Format: Calculation:
Format element |
Meaning |
---|---|
( |
Select the "(" format element under the Basic arithmetic operations node. |
Property |
Double-click the Property format element. In the subsequent dialog Format: Property click the character in front of the Part format element and select the subordinate format element Parts general and the Width property in the property list. |
* |
Select the "*" format element under the Basic arithmetic operations node. |
Property |
Double-click the Property format element. In the subsequent dialog Format: Property click the character in front of the Part format element and select the subordinate format element Parts general and the Height property in the property list. |
) |
Select the ")" format element under the Basic arithmetic operations node. |
+ |
Select the "+" format element under the Basic arithmetic operations node. |
( |
Select the "(" format element under the Basic arithmetic operations node. |
( |
Select the "(" format element under the Basic arithmetic operations node. |
Property |
Double-click the Property format element. In the subsequent dialog Format: Property click the character in front of the Part format element and select the subordinate format element Parts general and the Width property in the property list. |
* |
Select the "*" format element under the Basic arithmetic operations node. |
Property |
Double-click the Property format element. In the subsequent dialog Format: Property click the character in front of the Part format element and select the subordinate format element Parts general and the Height property in the property list. |
) |
Select the ")" format element under the Basic arithmetic operations node. |
* |
Select the "*" format element under the Basic arithmetic operations node. |
Constant |
Select the Constant format element. In the subsequent dialog Format: Constant select the Number option and enter the value "5". |
/ |
Select the "/" format element under the Basic arithmetic operations node. |
Constant |
Select the Constant format element. In the subsequent dialog Format: Constant select the Number option and enter the value "100". |
) |
Select the ")" format element under the Basic arithmetic operations node. |
Separator |
Close the dialog Format: Calculation. In the Format dialog, select the Separator format element. Enter a blank followed by the unit in the subsequent dialog, in this example "mm²". |
After you have configured the property, it is automatically available at all functions in the project.
You want to determine the sum of the power that is entered at the PCT loops (consumers) in the pre-planning.
You have entered the outputs at the PCT loops (consumers) in the supplied user-defined property EPLAN.PCT loop.Power.
You create a user-defined property with the assignment "Pre-planning", the field type "Value with unit" and the display type "Block property". Click [...] in the Block format field.
Select the Calculation format element in the dialog Format. Enter the following format elements in the specified sequence in the dialog Format: Calculation:
Format element |
Meaning |
---|---|
sum |
Select the "sum" format element under the Statistical functions node. |
Property |
Double-click the Property format element. In the subsequent dialog Format: Property click the character before the format element All subordinate segments and select the subordinate format element PCT loops and in the property list the EPLAN.PCT loop.Power property. |
Separator |
Close the dialog Format: Calculation. In the Format dialog, select the Separator format element. Enter a blank followed by the unit in the subsequent dialog, in this example "kW". |
After you have configured the property, you must make it visible for the desired segments (in this case the PCT loops). To this purpose you have to assign the property in the dialog Configure segment definitions to the corresponding segment definitions (in the tab Segment properties). The command path to the dialog is: Tab Pre-planning > Command group Edit > Configure segment definitions.
Example: Number of temperature measurements at PCT loops (pre-planning)
The project contains several PCT loops, some of which are used for temperature measurements. Now you want to determine the number of temperature measurements in the pre-planning. This includes all PCT loops for which the identifier "T" is entered in the Measurand property of the PCT loop number.
You create a user-defined property with the assignment "Pre-planning", the field type "Value with unit" and the display type "Block property". Click [...] in the Block format field.
Select the Calculation format element in the dialog Format. Enter the following format elements in the specified sequence in the dialog Format: Calculation:
Format element |
Meaning |
---|---|
count |
Select the "count" format element under the Statistical functions node. |
( |
Select the "(" format element under the Basic arithmetic operations node. |
Property |
Double-click the Property format element. In the subsequent dialog Format: Property click the character before the All subordinate segments format element and select the subordinate format element PCT loops and in the property list the Measurand property. |
;= |
Select the format element ";=" under the node Comparison operations for series. |
Constant |
Select the Constant format element. In the subsequent dialog Format: Constant select the Text option and enter the value "T". |
) |
Select the ")" format element under the Basic arithmetic operations node. |
Separator |
Close the dialog Format: Calculation. You can use a separator to define an additional (non-translatable) text for the display. In the Format dialog, select the Separator format element. Enter a blank followed by a text in the subsequent dialog, for example "Number of temperature measurements". |
After you have configured the property, you must make it visible for the desired segments (in this case the PCT loops). To this purpose you have to assign the property in the dialog Configure segment definitions to the corresponding segment definitions (in the tab Segment properties). The command path to the dialog is: Tab Pre-planning > Command group Edit > Configure segment definitions.
Tip:
If you want to display a translatable text together with the calculation property, you cannot define it using a separator in the format. As an alternative you can insert a "normal" multilingual text later during the configuration next to the component for which the calculation property is used and group it with the property text of the component.
This field contains the format elements comprising the format of the calculation formula.
To replace an operator in a calculation formula that was marked in the Selected format elements field by another operator, mark the desired new operator in the Available format elements field and click (Replace).
The selected format elements are displayed in table form with their designation, with their symbol (for example the property number at selected properties), with their schematic representation of the set format (for the preview) and - if available - with their value.
The order of the format elements in the list determines the order in which the individual format elements are used in the calculation formula. You can change the sequence using the arrow buttons on the toolbar.
The following can be displayed in the Preview column:
(This column is not available for calculations in the form and plot frame editor.)
- Values of properties: If you have marked an object before the definition of the block format and have selected a property as the format element, the property values of this object are displayed. If the property has an alphanumeric value (for example "6A"), the numerical value is additionally displayed in brackets (for example "6A (6)").
- Values in calculations: In the row of calculation functions, operators, closing brackets, etc., the concrete values of calculations and - in brackets - the associated operation are displayed. Here you can, for example, recognize whether the numerical or alphanumeric value of a property is used (for example alphanumeric value: "1 (6A = "6A")", numerical value: "1 (6 = 6)"). Constants of the type "Text" are displayed in quotation marks "".
- Error messages: If calculations cannot be carried out due to errors during the selection of format elements, error messages are displayed (for example "Calculation error: Division by 0. (1/0)").
- You have selected a function in the schematic and select the "DT (displayed)" format element. The displayed DT of the selected function is then displayed in the Preview column.
- You have marked a function in the schematic and select the "Function / technical characteristics" format element. The value "6A" is entered for the technical characteristics at the function. The alphanumeric value is then displayed in brackets in the Preview column, followed by the numerical value: "6A (6)".
- You have defined a calculation formula in which the technical characteristics of a function are compared with a specific value, for example with the value "6A". In the row with the operator "=" the following value is displayed in the Preview column: "1 (6A = "6A")". The number "1" indicates that the statement of the comparison operation is true.
If the calculation formula contains properties and you have selected one of these properties in the Selected format elements field, a navigation path is displayed here. This way you can recognize more easily from which object the property is determined.
The "Part / width" format element is marked in the Selected format elements field, and the values "Main function" and "Part" are displayed below each other in the Navigation field. This means that, starting from a function, the main function is searched for first. Subsequently, the part stored at the main function is determined and the value entered in the part property Width is displayed.
The value in this field defines the minimum number of digits to be used for the result. This value only affects the positions before the decimal point. If the result has fewer digits before the decimal point than specified here, then the missing digits are padded with the filler character you have defined in the Filler character field.
Missing positions are filled in with this filler character. The number of digits filled depends on the value you entered in the Minimum number of digits field.
If you entered a value of "4" in the Minimum number of digits field and the value "0" as the Filler character, numbers are output as follows: "0001".
The value in this field defines the minimum number of decimal places displayed in the result. If the result has more digits than allowed after the decimal point, then the digits are rounded to the permitted number of decimal places. If the result has fewer digits than allowed after the decimal point, then the missing digits are padded with the filler character you have defined in the Filler character field.
If this check box is selected then decimal places are never padded with filler characters. If the result has fewer digits than allowed after the decimal point, then the result remains unchanged. If the result has more digits than allowed after the decimal point, then the digits are rounded to the permitted number of decimal places.
In this group box you define the conditions under which the project / parts data is not output. Select an operator from the drop-down list. Enter a value for the condition in the field below this.
- Do not hide: No condition applies for the project data. The selected project data is always output.
- =: The selected project data is not output when it has a value equal to that specified in the field below.
- >: The selected project data is not output when it has a value greater than that specified in the field below.
- <: The selected project data is not output when it has a value smaller than that specified in the field below.
- >=: The selected project data is not output when it has a value greater than or equal to that specified in the field below.
- <=: The selected project data is not output when it has a value smaller than or equal to that specified in the field below.
- <>: The selected project data is not output when it has a value unequal to that specified in the field below. Only project data having this value is output.
Including preceding separator:
If this check box is selected then the project data satisfying the conditions in the fields above is not output, including any preceding separator. This setting affects the Separator format element preceding the Calculation format element.
Including following separator:
If this check box is selected then the project data satisfying the conditions in the fields above is not output, including any subsequent separators. This setting affects the Separator format element coming after the Calculation format element.
See also