Skip to main content

system.mes.oee.getDowntimeByReason

Description

Retrieves downtime events grouped by reason for a specified location and time range, with options to filter by specific availability reasons.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

system.mes.oee.getDowntimeByReason(locationPath, startDate, endDate, availabilityReasonPath)

Parameters

ParameterTypeNullableDescription
locationPathStringFalseThe path of the location to analyze.
startDateDateFalseThe start of the analysis time range.
endDateDateTrueThe end of the analysis time range. Defaults to the current time.
availabilityReasonPathStringTrueAn optional path to a specific availability reason to filter by.

Returns

A list JSON objects representing OeeDowntimeByReasonDTO objects, each containing the downtime analysis for a specific reason.

Each object has the following properties:

NameTypeNullableDescriptionDefault Value
availabilityReasonPathStringTruePath of the availability reasonnull
durationDoubleTrueDuration of downtime for this reason0.0
countLongTrueCount of downtime events for this reasonnull
durationPercentDoubleTruePercentage of total duration for this reason0.0
countPercentDoubleTruePercentage of total count for this reason0.0

Code Examples

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

# Get downtime by reason for the last 24 hours
locationPath = "Enterprise/Site/Area/Line1"
endDate = Date()
startDate = Date(endDate.getTime() - TimeUnit.HOURS.toMillis(24))

downtimeByReason = system.mes.oee.getDowntimeByReason(locationPath, startDate, endDate)

for reasonData in downtimeByReason:
print reasonData['availabilityReasonPath'], reasonData['duration']