Skip to main content

mes.spGetOEEDataSummary

Description

This stored procedure summarizes Overall Equipment Effectiveness (OEE) for a specified asset over a given date range. It aggregates production runs into one consolidated summary including runtime, downtime, and counter-based production metrics. It then applies a server-side function to compute derived OEE metrics such as availability, performance, and quality.

Syntax

mes.spGetOEEDataSummary @assetId, @rangeStart, @rangeEnd

Parameters:
@assetId (int): ID of the asset to analyze
@rangeStart (datetime): Start of the analysis range
@rangeEnd (datetime): End of the analysis range

Returns:
A single row summarizing:
- Asset metadata (assetId, runStart, runEnd)
- Aggregated time: durationSecs, runtimeSecs, unplannedDowntimeSecs, plannedDowntimeSecs
- Production counters: rawInfeedCount, rawOutfeedCount, rawWasteCount
- Standard rate and package count
- Targets (OEE, availability, performance, quality, threshold)
- Final calculated metrics from `fnGetOEEMetrics`: - **Availability** - **Performance** - **Quality** - **OEE**

Code Example

EXEC mes.spGetOEEDataSummary
@assetId = 1001,
@rangeStart = '2025-07-01',
@rangeEnd = '2025-07-15';