Reporting Trigger Edge
The Reporting Trigger Edge triggers the creation of a report after an event is triggered. An event is triggered when the input channel signal exceeds the configured edge at a specified threshold. Internally, the inputs that were once True remain True. The inputs are only reset to False as soon as all inputs were True at least once. This allows the output bNewResult to be used as one input by multiple Reporting Collectors and once all Reporting Collectors have sent a data message, a trigger message is sent.
Syntax
Definition:
FUNCTION_BLOCK FB_Rpt_TriggerEdge
VAR_OUTPUT
ipResultMessage: Tc3_EventLogger.I_TcMessage;
bError: BOOL;
bNewResult: BOOL;
bConfigured: BOOL;
fbTimeLastEvent: FB_ALY_DateTime;
sOverview: STRING(255) := '';
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. |
sOverview | STRING | Indicates which input channels were |
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. |
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. |
Properties
Name | Type | Access | Definition location | Initial value | Description |
---|---|---|---|---|---|
fTolerance | LREAL | Get, Set | Local | 0.0 | Tolerance value for the Equal / NotEqual comparisons |
Sample
VAR
fbRptTriggerEdge: FB_Rpt_TriggerEdge(sNetId:= '', nNumChannels:=2);
fbSystemTime : FB_ALY_GetSystemTime;
fEdgeCh1: BOOL;
fEdgeCh2: BOOL;
stThresholdEdge: ST_ALY_Threshold;
fTolerance: LREAL;
sReportName: STRING(255);
END_VAR
// Configure algorithm
IF bConfigure THEN
bConfigure := FALSE;
sReportName:= 'Beckhoff Report Template';
fTolerance:= 0;
stThresholdEdge.eComparisonOperator := E_ALY_ComparisonOperator.Equals;
stThresholdEdge.fThreshold := 1;
fbRptTriggerEdge.Configure(sConfigId:= sReportName, stThresholdEdge := stThresholdEdge);
END_IF
fbRptTriggerEdge.SetChannelValue(nChannel:= 1, input:= fEdgeCh1);
fbRptTriggerEdge.SetChannelValue(nChannel:= 2, input:= fEdgeCh1);
fbRptTriggerEdge.Call(tTimestamp);
Requirements
Development environment | Target platform | Plc libraries to include |
---|---|---|
TwinCAT v3.1.4024.0 | PC or CX (x64, x86) | Tc3_Analytics |