mes.spGetDowntimeDataForReliability
Description
Classifies downtime states into reliability buckets such as PLANNED, SETUP, MINOR_STOP, BREAKDOWN, or PROCESS_FAILURE. Useful for reliability and maintenance analytics. Derives data from `stateEvent`, `state`, and associated state metadata.Syntax
mes.spGetDowntimeDataForReliability @assetId, @rangeStart, @rangeEnd, @shortStopParameters:
@assetId (int): ID of the asset to analyze.
@rangeStart (datetime): Beginning of the evaluation period.
@rangeEnd (datetime): End of the evaluation period.
@shortStop (int): Threshold in seconds used to determine "Minor Stop" classification.
Returns:
List of downtime state events with:
- stateType and category details
- timestamps
- part-required indicator
- derived bucket classification
Code Example
EXEC mes.spGetDowntimeDataForReliability
@assetId = 1001,
@rangeStart = '2025-07-01',
@rangeEnd = '2025-07-30',
@shortStop = 300;