How-To Guides
Analytics Guides

Use the Online and Offline Percentage KPI

6min
the online and offline percentage kpi is a raw number indicating how long a sensor was functional and how long it was offline user scenario review the following scenario for the online and offline kpi processor then, using an input processor, you will simulate plc data and use this kpi to have more detailed knowledge of the time at a busy automotive manufacturing plant, the production line relies on a critical sensor to monitor engine performance the maintenance team uses the online and offline percentage kpi to track the sensor's functionality for instance, if the sensor was operational for 550 minutes but offline for 25 minutes during a specific shift, the team analyzes this data to optimize maintenance schedules and ensure continuous production efficiency step 1 add a device follow the steps to connect a device docid\ ish7bqhzxswtdx8vbnszb 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 docid\ xgwokqbtpevii7or82ll0 to learn more tag 1 tag1 name select s random value generator value type select float64 polling interval enter 1 tag name enter tag1 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 online and offline processor functions in litmus 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 tag1 click save click add processor again and select the online and offline percentage processor the following information defines this function unit time units for displaying online/offline status resetonstatus if you enable this parameter, the kpi will reset every time the status changes from on or off device reset enable this parameter to reset everything when the device changes time interval 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 online and offline percentage processor with a wire and use the events connection on the analytics canvas, click save the configured analytics flows should look like the following step 4 view output of processor click the view icon in the online and offline percentage processor to view the output values the output shows the offline and online durations along with the timestamp indicating when the device was last offline it also provides the total time elapsed since the kpi was initiated