Skip to main content

system.mes.oee.getTopInterruptionLocationsByCount

Description

Retrieves the top interruption locations, ranked by the number of downtime occurrences, for a specified parent location and time range. This helps identify which child locations are causing the most frequent interruptions.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getTopInterruptionLocationsByCount(locationIdOrPath, startDate, endDate, count)

Parameters

ParameterTypeNullableDescription
locationIdOrPathStringFalseThe parent location path or ID to analyze.
startDateDateFalseThe start time for the analysis period.
endDateDateFalseThe end time for the analysis period.
countIntegerFalseThe maximum number of interruption locations to return.

Returns

A list of JSON representations of DowntimeByInterruptionLocationDTO objects, each representing an interruption location and its aggregated data.

Each object has the following properties:

NameTypeNullableDescriptionDefault Value
interruptionLocationPathStringTruePath of the interruption locationnull
interruptionLocationNameStringTrueName of the interruption locationnull
durationDoubleTrueDuration of downtime caused by the interruption location0.0
countLongTrueCount of downtime events caused by the interruption locationnull
durationPercentDoubleTruePercentage of total duration caused by this interruption location0.0
countPercentDoubleTruePercentage of total count caused by this interruption location0.0

Code Examples

from java.util import Date
from java.util.concurrent import TimeUnit

# Get the top 5 most frequent interruption locations for a production line in the last 24 hours
lineLocation = "Enterprise/Site/Area/Line1"
endTime = Date()
startTime = Date(endTime.getTime() - TimeUnit.DAYS.toMillis(1))

topLocations = system.mes.oee.getTopInterruptionLocationsByCount(
lineLocation,
startTime,
endTime,
5
)

print "Top 5 Interruption Locations by Count:"
for location in topLocations:
print " - {}: {} interruptions, Total Duration: {:.2f} min".format(
location['interruptionLocationName'],
location['count'],
location['duration'] / 60.0
)