intersect
Short summary
overwrites the content of this set with the intersection of this set and the given set Set intersection: Common elements between two sets.
Example: Set A = 4 Set B = 4
Intersection of A and B: 4
Return: SUCCESS: if intersect is complete
ABORTED: execute has a falling edge during intersect,
BUSY: Intersect is in Progress
ERROR: the passed collection was not valid / contained invalid Elements
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| set | CNM_CollectionInterfaces.ISet | foreign set to intersect with | input |
| execute | BOOL | If intersect should be processed | input |
Code
Declaration
METHOD intersect : CNM_CollectionInterfaces.CNM_ReturnTypes.SingleExecutionState
VAR_INPUT
(*foreign set to intersect with*)
set : CNM_CollectionInterfaces.ISet;
(*If intersect should be processed*)
execute : BOOL;
END_VAR
Implementation
intersect := THIS^.set.intersect(set := set, execute := execute);