FB_ALY_OverallEquipmentEffectiveness

The Overall Equipment Effectiveness (OEE) calculates key figures that make it possible to compare the current state of the manufacturing process with its maximum potential.

Syntax

Definition:

FUNCTION_BLOCK FB_ALY_OverallEquipmentEffectiveness
VAR_OUTPUT
    ipResultMessage: Tc3_EventLogger.I_TcMessage;
    bError: BOOL;
    bNewResult: BOOL;
    bConfigured: BOOL;
    fOEE: LREAL;
    eOeeClass: E_ALY_Classification_3Cls;
    fbTimeOeeEventWarning: FB_ALY_DateTime;
    fbTimeOeeEventAlarm: FB_ALY_DateTime;
    fAvailability: LREAL;
    nPerformance: LREAL;
    fQuality: LREAL;
END_VAR

FB_ALY_OverallEquipmentEffectiveness 1: Outputs

Name

Type

Description

ipResultMessage

I_TcMessage

Contains more detailed information on the current return value. This special interface pointer is internally secured so that it is always valid/assigned.

bError

BOOL

This output is TRUE if an error occurs.

bNewResult

BOOL

When a new result has been calculated, the output is TRUE.

bConfigured

BOOL

Displays TRUE when the function block is successfully configured.

fOEE

LREAL

Overall equipment effectiveness in percent. It is calculated by multiplying the availability factor, the performance factor and the quality factor.

eOeeClass

E_ALY_Classification_3Cls

Result of the classification of the OEE.

fbTimeOeeEventWarning

FB_ALY_DateTime

Timestamp of the last classification of the OEE as a warning.

fbTimeOeeEventAlarm

FB_ALY_DateTime

Timestamp of the last classification of the OEE as an alarm.

fAvailability

LREAL

Availability factor in percent. It is calculated from the ratio between the runtime and the operating time.

fPerformance

LREAL

Performance factor in percent. It is calculated from the ratio of units actually produced and the number of units produced in the ideal case.

fQuality

LREAL

Quality factor in percent. It is calculated as the ratio of intact produced units to produced units.

FB_ALY_OverallEquipmentEffectiveness 2: Methods

Name

Definition location

Description

Call()

Local

Method for calculating the outputs for a specific configuration.

Configure()

Local

General configuration of the algorithm with its parameterized conditions.

Reset()

Local

Resets all internal states or the calculations performed so far.

SetChannelValue()

Local

Method for passing values to the algorithm.

Sample

VAR
    fbOEE : FB_ALY_OverallEquipmentEffectiveness;
    fbSystemTime : FB_ALY_GetSystemTime;

    tIdealCycleTime : LTIME := LTIME#1M30S;
    fThresholdLevelOkWarning : LREAL := 90.0;
    fThresholdLevelWarningAlarm : LREAL := 75.0;
    bConfigure : BOOL := TRUE;

    tScheduledTime : LTIME;
    tOperatingTime : LTIME;
    nUnitsProduced : ULINT;
    nDefectiveUnits : ULINT;
END_VAR
// Get current system time
fbSystemTime.Call();

// Configure algorithm
IF bConfigure THEN
    bConfigure := FALSE;

    fbOEE.Configure(tIdealCycleTime, fThresholdLevelOkWarning, fThresholdLevelWarningAlarm);
END_IF

// Call algorithm
fbOEE.SetChannelValue(1, tScheduledTime);
fbOEE.SetChannelValue(2, tOperatingTime);
fbOEE.SetChannelValue(3, nUnitsProduced);
fbOEE.SetChannelValue(4, nDefectiveUnits);
fbOEE.Call(fbSystemTime.tSystemTime);

Requirements

Development environment

Target platform

Plc libraries to include

TwinCAT v3.1.4024.0

PC or CX (x64, x86)

Tc3_Analytics