Reporting Trigger Interval
The Reporting Trigger Interval triggers the creation of a report after an event has been triggered. An event is triggered when the timespan of the configured interval has expired.
Syntax
Definition:
FUNCTION_BLOCK FB_Rpt_TriggerInterval
VAR_OUTPUT
ipResultMessage: Tc3_EventLogger.I_TcMessage;
bError: BOOL;
bNewResult: BOOL;
bConfigured: BOOL;
fbTimeLastEvent: FB_ALY_DateTime;
fbTimeCurrentInterval: FB_ALY_Timespan;
END_VAR
Outputs
Name | Type | Description |
---|---|---|
ipResultMessage | 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 |
bNewResult | BOOL | When a new result has been calculated, the output is |
bConfigured | BOOL | Displays |
fbTimeLastEvent | FB_ALY_DateTime | Stores the timestamp of the last message sent to the reporting server. |
fbTimeCurrentInterval | FB_ALY_Timespan | Indicates the timespan until the next event. |
Methods
Name | Type | 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. |
Pause() | Local | Method to pause the execution including the internal time intervals. |
Sample
VAR
fbRptTriggerInterval: FB_Rpt_TriggerInterval(sNetId:= '', nNumChannels:=2);
fbSystemTime : FB_ALY_GetSystemTime;
sReportName: STRING(255);
tInterval: LTIME;
END_VAR
// Configure algorithm
IF bConfigure THEN
bConfigure := FALSE;
sReportName:= 'Beckhoff Report Template';
tInterval := LTIME#5S;
fbRptTriggerInterval.Configure(sConfigId:= sReportName, tInterval:= tInterval);
END_IF
fbRptTriggerInterval.Call(tTimestamp);
Requirements
Development environment | Target platform | Plc libraries to include |
---|---|---|
TwinCAT v3.1.4024.0 | PC or CX (x64, x86) | Tc3_Analytics |