FB_PMLAdminTime
The FB_PMLAdminTime function block should be called cyclically to fill the following Admin-PackTags:
- PlcDateTime
- ModeTimeCurrent
- StateTimeCurrent
- CumulativeTimes[ ].AccTimeSinceReset
- CumulativeTimes[ ].ModeStateTimes[ ].Mode
- CumulativeTimes[ ].ModeStateTimes[ ].State[ ]
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.
Input
VAR_INPUT
stOptions : ST_AdminTimeOptions;
END_VAR
Name | Type | Description |
---|---|---|
stOptions | ST_PMLAdminTimeOptions | Additional options of the function block |
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
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
| PC (i386) | From Tc3_PackML_ V3 1.0.3 |