• No results found

EDIT−>FORMULAS – FORMULA EDITING COMMANDS

In document METSO (Page 68-74)

Figure 30 Structure of the Edit−>Formulas submenu

7.3.1 Create/Edit Design Member definitions – Creating and editing design members

All design members used in the formulas in a function block diagram must be specified using the dialog displayed with the Create/Edit Design Member definitions command.

Figure 31 Create/Edit Design Member definitions dialog

Enter the data for a new design member in the fields in the New attribute frame, and add them as a new line on the list in the dialog by clicking the Add button. The data items to be entered for a design member are:

 Tag: The identifier of the design member, included in the formula.

 Prompt: A description of the design member.

 Value: The value of the design member. The value can be entered directly in this field or determined by a value formula. If the value is determined by a value formu-la, you cannot enter a new value in this field but need to use the Edit−>Design Mem-bers command.

 Formula: The value formula that determines the value of the design member (in the Value field).

The easiest way to add new design member data to this dialog is by clicking the Find button, which retrieves all design members used in the formulas in the function block diagram and adds them to the list. Naturally, the formulas must be included in the symbols of the function block diagram before using the Find button.

You can select a design member for editing by clicking one of its data items on the list. The dialog has the following buttons:

 Highlight: Like the Edit−>Show Design Member Usage command, indicates the objects that use the selected design member.

 Purge: Removes the design members not used in formulas from the list. You will be asked to confirm this decision before it is carried out.

 Find: Retrieves the design members used in the function block diagram and adds the new ones to the end of the list in alphabetical order.

 Up: Moves the selected design member up the list.

 Down: Moves the selected design member down the list.

 Delete: Removes the selected design member from the list.

When the Create/Edit Design Member definitions dialog is opened, a design member symbol with the standard text “Design Members:” appears above the administration part of the func-tion block diagram to indicate that design members have been defined. For each line on the dialog list, an attribute is created to the design member symbol. But the only attribute shown in the symbol is $(TEMPLATE), i.e. the name of the used template.

Figure 32 The design member symbol above the administration part

The operators and functions allowed in formulas are presented in Appendix 3, “Functions Allowed in Formulas”.

7.3.2 Edit Formulas –Editing formulas

You can use the Edit Formulas command to edit all the formulas in a function block diagram via one dialog.

Figure 33 Edit Formulas dialog

The first column in the dialog (Object Type) shows the type of the object attached to the for-mula, which is one of the following:

 Attribute: only a value formula is possible.

 Block: only a function formula is possible.

 Text: either a value or a function formula is possible.

 Line: only a function formula is possible.

Other items that can be edited in the dialog:

 Function Formula: The function formula whose truth value is used to determine whether a certain part of the engineering object is enabled or disabled.

 Prompt: A description of the design member.

 Value: The value of the design member.

 Value Formula: The value formula that determines the value of the design member (in the Value field).

If you want to remove the formula definition of an object, you can, for example, remove the formula from the Function Formula or Value Formula field in the Edit Formulas dialog. Save the change by clicking the OK button in the dialog. The formula line disappears from the Edit Formulas dialog.

If you want to see the object to which a certain formula line is attached, choose the desired line and click the Highlight button. The object attached to the line is indicated by dashed lines in the diagram.

Note that if an object is hidden by its function formula when Edit Formulas command is gi-ven, the object and its function formula will not be displayed in the Edit Formulas dialog.

Before using the Edit Formulas command, select the View−>Function formula on/off com-mand if you want to display also the hidden objects with their formulas in the dialog.

7.3.3 Attach/Edit Formula – Attaching and editing formulas

You can use the Attach/Edit Formula command to attach a formula to selected objects. You can also use the command to edit a formula attached previously.

After selection of the command, the following is displayed on the command line:

Select objects:

Select the objects to which you want to attach the formula. The Edit Formula dialog is dis-played. Enter the formula used to control the objects.

Figure 34 Edit Formula dialog

For example, if you enter the function formula $(IORACK)==PB in the Formula field, the objects attached to the formula are in use (and displayed in the function block diagram) when the value of the design member $(IORACK) is PB. If the value is something else, the objects are not displayed and the function is disabled.

In case of a text type object, you can also use this command to attach a value formula to the object by unchecking the Function formula check box and entering the value formula in the Formula field. If you have selected an object of another type (attribute, block, line), the Func-tion formula check box is grayed out and you can attach only a funcFunc-tion formula.

The operators and functions allowed in formulas are presented in Appendix 3, “Functions Allowed in Formulas”.

An example of attaching a value formula to a text type object (comment text)

If you want to display the value of the $(AFTFC) design member in a function block diagram in connection with the mtr function block, follow the instructions below:

 Create a comment text to a desired location (under the mtr function block) with the Draw−>Comments−>Dtext command. It is not important what comment text is given unless it is not left out.

 Give the Edit−>Formulas−>Attach/Edit Formula command and select the previous-ly created comment text to be an object.

 Uncheck the Function formula check box in the dialog.

 Enter the desired value formula in the Formula field of the dialog.

 Now, the value of the $(AFTFC) design member is displayed in the function block diagram as shown in the following figure:

7.3.4 FWizard – Replacing an attribute value with a formula

You can use the FWizard command to find an attribute value and to replace it with the desired formula. This way, you can easily create a working template by changing a tested loop with a few FWizard commands. When you use the FWizard command, the following is displayed on the command line:

Select objects:

Enter the objects in which the attribute value (character string) is to be searched for: either select individual objects with the mouse or enter All on the command line to search the entire function block diagram. Then enter the string to be found (and replaced):

Find value:

Finish by entering the formula with which the string is to be replaced:

Add formula:

When the command has been performed, the following message is displayed on the com-mand line, with “x” indicating the number of formulas added:

Added x formula(s).

Example: The DIRECT ACCESS PORT NAME attribute in the function block has the value pr:FIC−100, and you want to replace the value FIC−100 with the string $(TAG). You do this using the FWizard command, which finishes by telling you that one formula was added. This formula is of the format pr:$(TAG). In other words, the command searches for the attribute value, and if it is found, replaces it with a formula.

If this command had been performed on the entire function block diagram, the following for-mulas would have been created:

You can use the Initialize command to initialize all the formulas in a function block diagram in accordance with the design member values of the design member symbol. Note that syn-chronized values (denoted by “@”) are also initialized in accordance with the design member symbol.

The command must be used when the function block diagram to be implemented has already been attached to the loop and when, for example, you change the $(MIN) or $(MAX) values in the design member symbol and want to change the synchronized initial values of the alarm limits, calculated on the basis of the changed values, to match the new values. Normally, when you change the value of a design member via the design member symbol, the synchro-nized values are not changed.

7.3.6 Show Design Member Usage – Displaying the objects attached to a design member

You can use the Show Design Member Usage command to indicate the objects in the function block diagram that use the design member in question. The objects are indicated by dashed lines in the function block diagram. After selecting the command, you are prompted to enter the name of the design member:

Give design member name:

For example, if you enter the design member $(MIN), this is usually used in the I/O symbol, the tag function symbol, and the history function symbol. Accordingly, these symbols will be indicated by dashed lines in the function block diagram after the command has been per-formed.

In document METSO (Page 68-74)