|
Creating a Calculated Descriptive Indicator
VB.NET and C# Scripts
•
•VB.NET
C#
Stored Procedures
This topic explains how to create a calculated descriptive indicator. For more information on using functions in calculated indicators, see Functions and Logical Operators.To Create a Calculated Descriptive Indicator
1.
2. Click New. The Create New Indicator dialog appears.
3.
5.
• Select a descriptive indicator type from the Indicator type list. The window changes to reflect the value type.
6. Select “Calculated using a formula” in the Collection method list. The Calculation tab is added to the window. For example:
7. On the Collection tab, you can enter values that determine how often readings are expected and the next collection date. You can also enter information to make it easier to select this indicator when adding indicators to a work order task or standard task, when copying indicators to another asset, when setting up dynamic inspection routes, or when implementing reliability programs.
8. To specify the months during which readings should be taken, select the Seasonal tab. Click This indicator is collected seasonally and select the starting and ending dates. For example:
9. On the Description tab, you can enter a detailed description of the indicator and what it measures. On the Image tab, you can also paste an image into the box.
10. On the States tab, you can set up states and alarms for the indicator. You should set up a state for each possible value identified in the calculation. For the example in this topic, you would set up three states called “Normal”, “Fair Condition”, and “Worn Out”. You can also set up alarms for any non-normal states. For detailed instructions, see Adding States and Alarms to an Indicator or Template.
11. Select the Calculation tab.
12. On the Expression tab, select the type of expression. A calculated indicator can be based on:
• VB.NET – Inputs and functions defined on the Calculation tab can be used to create a formula that is calculated at run time. This is the default option
• C# – Inputs and functions defined on the Calculation tab can be used to create a formula that is calculated at run time
• Stored procedure – The expression is provided in a stored procedure that receives its inputs at runtime and returns a valueWith the Complete class option, a starter script template is provided automatically, which you can edit as needed. You can also click Regenerate from Template to reset the formula to the starter script.Tip: You can view the template scripts by opening the Enterprise window, clicking the Administration menu and then Calculation options. For more information, see Defining Calculation Options.
15. If the type of express is stored procedure, the information on the Calculation tab changes:From the New list, select either Indicator Input or Filter Input. The Calculation Input dialog appears. The input name must match the name of an argument named in the function (for example, Input1). For detailed instructions, see the following topics:
17. Click OK when you have finished creating the input. The Calculation Input dialog closes and the input is added to the table of inputs.
18. For VB.NET or C# script expressions, you can check the syntax (the order of the elements) of your calculation by clicking Calculate on the Expression tab. APM looks for errors in how you typed the calculation. In addition, the system uses the test values on the inputs to complete a test calculation. You can use the result of this calculation to check that the expression is giving the desired results.
19. When you have defined the calculation expression and inputs, you can click Check (Test). The test function uses the values from the inputs (for example, indicator readings) and displays the result in the Test Reading window.
21. If necessary, you can change the Required Proximity of the calculation inputs. This option appears in the Expression tab after you have added two or more inputs based on readings.
22. Select the Frequency tab. In the Triggering mechanism section, select when and how the system triggers the calculation. If the calculation is to be triggered at a regular interval (based on a recurrence pattern), define the scheduled interval for the indicator.
23. Select the Auditing tab. To improve product performance, you can control the amount of audit information generated when a reading is created. (The audit information is displayed in the Indicator Reading window, Calculation tab.)
• Full auditing – Full information is displayed on the reading’s Calculation tab
• Description and input values – The reading’s Calculation tab displays the description and input values in the text field. The table of input values is not displayed
• No auditing – The reading’s Calculation tab is not displayed
24. Select the Jobs and Tasks tab. On this tab, you can add the standard jobs, standard tasks, and templates that will be displayed to users acknowledging alarms or warnings.
25. If APM interoperability has been set up to access data in SAP Plant Maintenance, the SAP Corrective Tasks tab is available. Select this tab to browse for SAP objects for reference purposes. You can add maintenance items, maintenance plans, and task lists.
26.
Amount of time (for example, weeks, months, years) for which to show indicator readings. When this option is enabled, the Indicator window’s Readings view, Readings tab displays readings for this amount of time, ending with the next reading date. This setting also affects how KPI readings are displayed on dashboards.
28.