Use the Uptime and Downtime by Value KPI
You can use the UpTime and DownTime by Value KPI processor to compare your current value with a desired value. The KPI sorts them as either uptime or downtime based on the specified condition ( greater(>), less(<), equal(==) or notEqual(!=) ) and a delta to round off mistakes.
Review the following scenario for the uptime and downtime by Value KPI processor. Then, using an input processor, you will simulate PLC data and use this KPI to have more detailed knowledge of the time.
In a manufacturing plant, the PLC monitors a critical component with an ideal value of 10.5. If the output drops below 5 or deviates by 0.5 value, it signifies potential issues, triggering downtime. For instance, if the output equals 0, it also means downtime. The plant manager can use the Uptime and Downtime KPI processor to analyze these conditions and gain insights into the production line's status. This scenario allows for proactive maintenance and operational decisions, ensuring real-time visibility and minimizing unplanned downtime.
Follow the steps to Connect a Device and configure the following parameters:
- Device Type: Simulator
- Driver Name: Generator
- Enable Alias Topics: Select the checkbox.
After connecting the device, add the following tag. See Add Tags to learn more.
- Name: Select S - Random value generator.
- Value Type: Select float64.
- Polling Interval: Enter 1.
- Tag Name: Enter tag1.
- Min Value: Enter 0.
- Max Value: Enter 11.5.
You can now create the analytics flows using data from the device and tag you previously created.
To create an analytics flow with the UpTime and DownTime by Value Processor function:
- In Manufacturing Connect Edge, navigate to Analytics.
On the analytics canvas, click Add processor. The Create a processor dialog box displays.
- Select DataHub Subscribe.
In the Topic field, click the Search icon, select the device you previously created, and then select the alias topic for the tag1.
- Click Save.
- Click Add processor again and select the UpTime and DownTime by Value processor. The following information defines this function:
- Unit: Select the time units from the drop-down menu to display the uptime/downtime status. Choose seconds for this user scenario.
- Condition: Select a condition from the drop-down menu for comparing the current value to the desired value. Choose the less than (<) condition for this user scenario.
- Desired Value: Enter a desired value to check the current uptime/downtime status. Use 10.5 for this user scenario.
- Delta of Tolerance: Enter a delta of 0.5 to allow for a tolerance of +/- 0.5 from your desired value. If you input a delta of 0, even the smallest change will be detected by this KPI.
- TimeInterval: If the tag publishes at the expected interval, it is better to disable this timer by entering 0 in the field.
Click Save.
- Connect the DataHub Subscribe processor (tag: tag1) to the UpTime and DownTime by Value processor with a wire and use the events connection.
- On the analytics canvas, click Save.
The configured analytics flows should look like the following:
Click the View icon in the UpTime and DownTime by Value processor to view the output values.
The output will display the message payload with the uptime and downtime value field, disregarding current values within +/- 0.5 of your desired value.