Formula Editor Dialog Box

You can create formulas within the Data Collect Plan(DCP) Dialog dialog box. Selecting the Add Computed Data Collect Row, then Formula Function Edit command. This allows you to perform advanced data collection on the shop floor – computation of new values based on previously collected values and, or computations.

This dialog box contains controls for:

This page discusses:

See Also
Using Create Data Collect Plan Instruction
Data Collect Row and Data Collect Checklist Row Dialog Boxes
Creating a Formula - Example Workflow
CATRule for Display Names for Functions and Math Functions

The top bar of the panel consists of an editor on the left and a series of commands on the right. The editor allows for the changing of the Data Collect Plan Reference’s name. The changes commit as soon as the editor loses focus and pressing ESC while the editor has focus reverts to any unsaved changes.

Click Show Preferences and the dialog box appears with options to change the level of detail when displaying names.

Formula Type

Computed (mono-value)
You can use this to compute one single result value.
Computed (multi-value)
You can compute several results for the row.

Formula

Text Editor
Functions, Math Functions, Attributes, and Operations can either be entered into the text editor or select the lists. Selecting from the lists, they are added at the current location of the cursor in the text editor. Delete and backspace keys can also be used to clear portions of the formula.
The formula can also include numbers/values used with mathematical operators. It is manually managed during the formula editing through the Text Editor field.

Example: f(x) = Req 15.CollectedMin / 2

Numbers and Values must be defined according to the expected usage:

  • Number (for mathematical operators): example: f(x) = Req 15.CollectedMin / 2
  • Value (with unit) examples:
    • f(x) = Req 15.CollectedAverage + 0.002
    • in this example, the intent of the formula is to add a value (2 mm) to the collected value.
    • The value must be created using MKS system of units.
    • There is no unit conversion inside the Text Editor.
    • It is your responsibility to create the value according to the MKS unit. No control is performed by the Check syntax.

The value displayed in the editor does not depend on the Display Unit defined on the Data Collect Plan row.

In this example: For rank 2 of the Data Collect Plan row, the display unit is centimeter (cm). Nevertheless, any value manually in the formula must be according to MKS system of units.

Clear Formula
Clears the selected Formula.
Checks Syntax

A syntax checker is used to ensure that the formula is executable on the shop floor.

The checker in invoked in two cases:

  • Clicking Check Syntax in the Formula Editor (explicit invocation mode).
  • Clicking OK in the Formula Editor (implicit invocation mode).

A message displays if errors are encountered.

Note: If the checker is invoked at the time of clicking OK, then the Formula Editor panel remains open until you have corrected all the reported errors.

Below are some of the verifications that are made by the syntax checker.

Formula Rules

Content inside brackets is evaluated first.

2 x ( Req 13.CustomReqAttr1 - Req 11.CollectedAverage )

ForAverage,Sum,Max,Min the values must be separated by a comma.

Average( Req 11.SpecifiedMin , Req 12.SpecifiedMax )

Min( Req 13.CollectedAverage, Req 13.CollectedAverage )

The power value must be added after a comma.

Power( Req 13.CollectedAverage, 3 )

Brackets can be nested. Inner contents are evaluated first, then the outer ones.

Absolute( ( (Req 11.CollectedSum - Req 13.CollectedSum) x 3 ) - ( (Req 12.CollectedSum - Req 13.CollectedSum) x 3 ) )

Requirements from Manufacturing Items tab



Items or Objects

The object selection section allows you to select the Requirements used in the formula.

  • Items:The Items list displays all Items that are implemented by current and previous Operations in the current Workplan / System. Items of parallel Operations are not listed.
  • Requirements of selected Item: Requirements linked to the selected Item (in the Items list).
Filter Objects -This filters the objects shown.
Requirements of Selected Object
Edit Filter
This shows the column filter manager. This displays the requirements of the selected Object. The Requirements you must select the list.
Edit Row Attributes- The columns that display for Requirements consists of the attributes (default delivered attributes as well as any customer defined ones). The visibility of these attributes (columns) you can change. This visibility change is stored in user preferences and is used the next time the panel opens.

Requirements from Operations tab



Lists the current Operation and all Operations previous to that in the current System / Workplan.

Note: The Current Operation is listed first in the list and is automatically preselected – so Requirements linked to it display.

In the existing Data Collect Plan panel, an alert icon displays to the left of the formula in case it is invalid.

Note: The same set of checker rules is used by the Formula Validity command, the DCP Panel, and the Formula Editor to flag a Formula as invalid.

Operations

The Operations selection section allows you to select the Requirements used in the formula.

  • Operations:The list displays all operations.
  • Requirements of selected Operations Category: Requirements linked to the selected operation (in the Operations list).

Examples

  1. In this example, there are some Operations sequenced by Product Flows. There are Requirements associated with the Operations. You have an authoring a Formula for a DCP Row under Operation OP 23A

    Operations OP 23A, OP 22, and OP 21 is listed in the panel and their associated Requirements are available for use in the Formula.

    Displayed Information - Working in a two level structure, example, Operations directly under a Workplan / System, then only the Operation name displays in the Operations list.

    Displayed Information - Working in a three level structure - example Workplan / Header Operation / Operation or System / General Operation / Operation structure, then the leaf level Operation name displays along with its parent (Header / General) Operation name inside square brackets [ ].

  2. Three Level Structure - Authoring a Formula for a DCP Row under Operation OP 33A.

    In the Operations list, OP 33A displays along with all the Operations shown with a blue background in this example.

    • OP 32, OP31,
    • Header OP 1,
    • OP 11, OP 12, OP 13


  3. Product Flow versus Time Constraints coming from the Process Planning app - In this example, OP 11, OP 12, and OP 13 is not listed when authoring Formula for a DCP Row under OP 34 (since they are linked by Time Constraints).

    Only Operations linked to the current Operation directly or indirectly with Product Flows is considered as Previous. Operations linked with Time Constraints are not considered.

Filter Objects -This filters the list of displayed Operations using the parent or the child Operation name.
Requirements of Selected Operation Category
Edit Filter
This shows the column filter manager. This displays the requirements of the selected Operations. The Requirements you must select the list.
Edit Row Attributes- The columns that display for Requirements consists of the attributes (default delivered attributes as well as any customer defined ones). The visibility of these attributes (columns) you can change. This visibility change is stored in user preferences and is used the next time the panel opens.

Functions, Math Functions, and Operators

This displays the functions and operators to create a formula.

Functions
The following functions are provided to assist in building the formula:
  • CollectedAverage
  • CollectedMax
  • CollectedMin
  • CollectedSum
  • Computed
  • ComputedAverage
  • ComputedMax
  • ComputedMin
  • CollectedAverageComparison()
  • CollectedMaxComparison()
  • CollectedMinComparison()

The Collected functions above are selected when the formula requires the use of actual values collected (counted / measured / and others) by workers on the shop floor.

The Computed functions above are used to retrieve the results of formulas from previous Data Collect Rows of type computed (for ‘Computed (mono-value)’ and ‘Computed (multi-values)’ formula types).

Note:
  • Computed is used to access the result of a previous mono-valuated formula. See Computed example.
  • ComputedMin, ComputedMax, and ComputedAverage are used to access the results of a previous multi-valuated formula. See Computed example.

The Comparison functions are dedicated, predefined functions for comparing two or more lists of collected values. See Comparison.

Math Functions

The following mathematical functions are supported for building the formula:

  • Absolute()
  • Average()
  • Cos()
  • Max()
  • Min()
  • Power()
  • Round()
  • SquareRoot()
  • Sin()
  • Sum()
  • Tan()

The formula can also reference attribute values defined on the Requirement: reference to the value is done through the custom attribute name (CustomReqAttr1, …)

The Custom attributes are the attributes (optionally) added by the customer on Requirements.