FB_ALY_BandwidthClassificator_3Ch
Bandwidth Classifier 3Ch determines whether the input signal is within the limits or is less than or greater than the limits. The limits can be configured with input signals, so it is possible to use curves as lower and upper band.
Syntax
Definition:
FUNCTION_BLOCK FB_ALY_BandwidthClassificator_3Ch
VAR_OUTPUT
ipResultMessage: Tc3_EventLogger.I_TcMessage;
bError: BOOL;
bNewResult: BOOL;
bConfigured: BOOL;
eClass: E_ALY_Classification_Bounds;
fbTimeLastEvent: FB_ALY_DateTime;
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 |
eClass | Class to which the input values belong (WithinBounds/Smaller/Bigger). | |
fbTimeLastEvent | FB_ALY_DateTime | Timestamp of the last change of the classification result. |
Methods
Name | Definition Location | Description |
---|---|---|
Call() | Local | Method calculates the outputs for a given configuration. |
Reset() | Local | Resets all internal states or the calculations made so far. |
SetChannelValue() | Local | Method to pass values to the algorithm. |
Sample
VAR
fbBandwidthClassificator : FB_ALY_BandwidthClassificator_3Ch;
fbSystemTime : FB_ALY_GetSystemTime;
fInputLowerBound : LREAL;
fInputUpperBound : LREAL;
nInput : INT;
END_VAR
// Get current system time
fbSystemTime.Call();
// Call algorithm
fbBandwidthClassificator.SetChannelValue(1, nInput);
fbBandwidthClassificator.SetChannelValue(2, fInputLowerBound);
fbBandwidthClassificator.SetChannelValue(3, fInputUpperBound);
fbBandwidthClassificator.Call(fbSystemTime.tSystemTime);
Requirements
Development environment | Target platform | Plc libraries to include |
---|---|---|
TwinCAT v3.1.4024.0 | PC or CX (x64, x86) | Tc3_Analytics |