How-To Guides
Analytics Guides

Use the Maintenance and Failure KPI

7min

The Maintenance and Failure KPI mainly deals with the maintenance event and a fault/failure event in a production cycle.

For this KPI, two input definitions are required: maintenance and failure.

These are event triggers, indicating the event of the maintenance cycle and the discovery of a failure event, respectively.

User Scenario

Review the following scenario for the maintenance and failure KPI processor. Then, using an input processor, you will simulate PLC data and calculate:

  1. Total maintenance events per cycle
  2. Total failure events per cycle
  3. Time since last maintenance
  4. Time since last failure
  5. Timestamp of last maintenance
  6. Timestamp of last failure

In a manufacturing setting, the maintenance and failure KPI can be used to monitor the performance of production machinery. For example, in a bottling plant, this KPI can track the number of maintenance events and machine failures during the production cycle. By analyzing this data, the plant can determine the average frequency of maintenance, identify any trends in machine failures, and schedule preventive maintenance to reduce downtime. This helps in optimizing production efficiency and minimizing disruptions.

Step 1: Add a Device

Follow the steps to Connect a Device and configure the following parameters:

  • Device Type: Simulator
  • Driver Name: Generator
  • Enable Alias Topics: Select the checkbox.

Step 2: Add Tags

After connecting the device, add the following tag. See Add Tags to learn more.

Tag 1: maintenance

  • Name: Select S - Random value generator.
  • Value Type: Select float64.
  • Polling Interval: Enter 1.
  • Tag Name: Enter maintenance.

Tag 2: failure

  • Name: Select S - Random value generator.
  • Value Type: Select float64.
  • Polling Interval: Enter 1.
  • Tag Name: Enter failure.

Step 3: Create Analytics Flow

You can now create the analytics flows using data from the device and tag you previously created.

To create an analytics flow with the Maintenance and Failure Processor function:

  1. In Litmus Edge, navigate to Analytics.
  2. On the analytics canvas, click Add processor. The Create a processor dialog box displays.

    The Add processor option
    The Add processor option
    
  3. Select DataHub Subscribe.
  4. In the Topic field, click the Search icon, select the device you previously created, and then select the alias topic for tag1: maintenance.

    Create a Processor dialog box
    Create a Processor dialog box
    
  5. Click Save.
  6. Repeat steps 2-5 to add another DataHub Subscribe processor for the failure tag.

    Canvas flow with two DataHub Subscribe processor
    Canvas flow with two DataHub Subscribe processor
    
  7. Click Add processor again and select the Maintenance and Failure processor. The following information defines this function:
    • Maintenance From & Maintenance To: If your input changes Maintenance From value to Maintenance To value, it will trigger a maintenance cycle.
    • Failure From & Failure To: If your input changes Failure From value to Failure To value, it will trigger a failed cycle.
    • Unit: Enter the time unit to display time since last maintenance or failure event.
    • TimeInterval: If the tag publishes at the expected interval, it is better to disable this timer by entering 0 in the field.
    • Click Save.

      Edit a Processor dialog box
      Edit a Processor dialog box
      
  8. Connect the DataHub Subscribe processor (tag: maintenance) to the Maintenance and Failure processor with a wire. Use the Events connection and enter a definition of maintenance for the connection.
  9. Repeat step 8 for tag: failure and enter a definition of failure for the connection.
  10. On the analytics canvas, click Save.

The configured analytics flows should look like the following:

Completed flows canvas
Completed flows canvas


Step 4: View Output of Processor

Click the View icon in the Maintenance and Failure processor to view the output values.

Output of Maintenance and Failure processor
Output of Maintenance and Failure processor