F_BA_CheckEnum

The function F_BA_CheckEnum of return type BOOL determines whether the value nIndex of an enumeration exists within a predefined list aInfo of type ARRAY [*] OF ST_BA_EnumInfo.
By the syntax ARRAY [*] the reference to fields of undefined size is possible.
Sample:
aAction : ARRAY[1 .. 2] OF ST_BA_EnumInfo := [
(*eDirect*) (sName := 'Direkt', sDescription := 'Gleichläufiger Wirksinn', sShortcut := ''),
(*eReverse*) (sName := 'Indirekt', sDescription := 'Gegenläufiger Wirksinn', sShortcut := '')
];
If this field would be applied to the IN_OUT variable aInfo, the function would return "TRUE" for the values 1 and 2 at nIndex, otherwise "FALSE".
Syntax
FUNCTION F_BA_CheckEnum : BOOL
VAR_INPUT
nIndex : INT;
END_VAR
VAR_IN_OUT
aInfo : ARRAY [*] OF ST_BA_EnumInfo;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
nIndex | INT | Index to be examined. |
Inputs/outputs
Name | Type | Description |
---|---|---|
aInfo |
List in which the element with the index nIndex is to be found. |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT 3.1 4024.35 | Tc3_BA2_Common from V2.1.20.0 |