FB_ALY_Bitmask
The Bitmask module can be used to evaluate individual bits. To do this, the individual bits of the input value are output as Boolean values at the output.
Syntax
Definition:
FUNCTION_BLOCK FB_ALY_Bitmask
VAR_INPUT
bPersistent: BOOL;
END_VAR
VAR_OUTPUT
ipResultMessage: Tc3_EventLogger.I_TcMessage;
bError: BOOL;
bNewResult: BOOL;
bConfigured: BOOL;
END_VAR
Outputs
Name | Type | Description |
|---|---|---|
ipResultMessage | Contains more detailed information on the current return value. For this special interface pointer, it is ensured internally that it is always valid/assigned. | |
bError | BOOL | The output is |
bNewResult | BOOL | When a new result has been calculated, the output is |
bConfigured | BOOL | Displays |
Methods
Name | Definition location | Description |
|---|---|---|
Call() | Local | Method for calculating the outputs for a specific configuration. |
Reset() | Local | Resets all internal states or the calculations performed so far. |
SetChannelValue() | Local | Method for passing values to the algorithm. |
Example
VAR
fbBitmask : FB_ALY_Bitmask;
nInput : BYTE := 2#10101100;
aBits : ARRAY[1..8] OF BOOL;
END_VAR// Call algorithm
fbBitmask.SetChannelValue(nInput);
fbBitmask.Call(ADR(aBits), SIZEOF(aBits));Requirements
Development environment | Target platform | Plc libraries to include |
|---|---|---|
TwinCAT v3.1.4024.0 | PC or CX (x64, x86) | Tc3_Analytics |