Description
You can use the "Check for ARRAY" instruction to query whether the <operand> parameter points to a tag of the ARRAY data type.
The <operand> must have the VARIANT or ResolvedSymbol data type.
Parameters
The following table shows the parameters of the "Check for ARRAY" instruction:
|
Parameters |
Declaration |
Data type |
Memory area |
Description |
|---|---|---|---|---|
|
<Operand> |
Input |
VARIANT, ResolvedSymbol |
L (The declaration is possible in the "Input", "InOut" and "Temp" sections of the block interface.) |
Operand that is queried for ARRAY |
|
OUT |
Output |
BOOL |
I, Q, M, D, L |
Result of comparison |
For more information on valid data types, refer to "See also".
|
Note Checking an ARRAY data block If you use the IS_ARRAY instruction with an ArrayDB and generate the VARIANT input parameter via DB_ANY_TO_VARIANT , a symbolic use of the ArrayDB must be present elsewhere in the program as an actual parameter of a formal parameter of the data type VARIANT. To work correctly, it is sufficient if the point of use is downloaded. It is not necessary to execute it. |
Example
The following example shows how the instruction works:
The "TagOut" output is set when the following conditions are fulfilled:
-
The operands "Tag_In1" and "Tag_In2" have signal state "1".
-
The condition of the comparison instruction is fulfilled, i.e. the "#Tag_VARIANTToArray" operand is of the ARRAY data type.