FB_PMLAdminTime

FB_PMLAdminTime 1:

The FB_PMLAdminTime function block should be called cyclically to fill the following Admin-PackTags:

The length of time for which the machine was in the different states is thus recorded. In the further process, this allows conclusions to be drawn about the machine efficiency. To ensure that the times are calculated correctly, it is a prerequisite that the UnitCurrent and StateCurrent Status-PackTags have already been written coherently.

The individual timers can be reset using the M_ResetCumulativeTime method.

FB_PMLAdminTime 2: Input

VAR_INPUT
    stOptions        : ST_AdminTimeOptions;
END_VAR

Name

Type

Description

stOptions

ST_PMLAdminTimeOptions

Additional options of the function block

FB_PMLAdminTime 3: Inputs/Outputs

VAR_IN_OUT
    stAdmin          : ST_PMLa;
    stStatus         : ST_PMLs;
END_VAR

Name

Type

Description

stAdmin

ST_PMLa

Transfer of the Admin-PackTags

stStatus

ST_PMLs

Transfer of the Status-PackTags

M_ResetCumulativeTime

FB_PMLAdminTime 4:

The M_ResetCumulativeTime method resets the Admin.CumulativeTimes[CumulativeTimesIdx] entry.

Syntax

METHOD M_ResetCumulativeTime : BOOL
VAR_INPUT
  CumulativeTimesIdx : UDINT;
END_VAR

Example call:

  fbAdminTime.M_ResetCumulativeTime(CumulativeTimesIdx := 1);

Requirements

Development Environment

Target platform

PLC library to include

From TwinCAT

  • 3.1 Build 4024.63

PC (i386)

From Tc3_PackML_ V3 1.0.3